Answer the question
In order to leave comments, you need to log in
Can I somehow set the order of initialization of vue components?
there is such a structure
<div id="app">
<first-component></first-component>
<second-component></second-component>
<third-component></third-component>
</div>
Vue.component("first-component", () => import(`first-component-path.vue`));
Vue.component("second-component", () => import(`second-component-path.vue`));
Vue.component("third-component", () => import(`third-component-path.vue`))
Answer the question
In order to leave comments, you need to log in
With such an architecture, it is impossible.
You have three asynchronous components. Each component is loaded independently, and rendered when it is loaded. Your components should remain completely independent of each other.
Your problem is that the module in vuex depends on the component. And it shouldn't be. Load vuex before and only then initialize the components.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question