I have a single file component named Foo:
<template>
<div>
This is the main app. X is {{ x }}, y is {{ y }}
</div>
</template>
<script>
export default {
data() {
return { x: 'hello x' };
},
}
</script>
My initialization process for the app looks like this:
// Here 'node' represents a DOM node,
// and 'y' is initialized.
import Vue from 'vue';
import Foo from './Foo.vue';
const app = new Vue({
'el': node,
data: {y},
render: h => h(Foo)
});
This explanation oversimplifies the fact that 'y' is actually an object rather than just a simple string. It's an important detail to note.
I understand how to pass props to child components, but I am having trouble figuring out how to get the main configuration data into the top-level Vue app!