In Vue2 it was possible to do a pattern like so:
import TopLevelComponent from './TopLevelComponent.vue';
// const someLocalConfig = { prop1: 'val1', ... };
const app = new Vue({
data() { return {}; },
render: h => h(TopLevelComponent, {props: someLocalConfig})
});
Which gave you a way to use a single file component for the root component while booting the app by injecting config from elsewhere.
How do I do this in Vue3?
I've read that I can do this:
import { createApp } from 'vue';
import TopLevelComponent from './TopLevelComponent.vue';
const app = createApp(TopLevelComponent);
But how can I pass in someLocalConfig
as the props for the app/top level component?