vuejs / vuex

🗃️ Centralized State Management for Vue.js.
https://vuex.vuejs.org
MIT License
28.42k stars 9.58k forks source link

Vuex Store undefined SSR with component as both child and root #2123

Open 0Rick0 opened 2 years ago

0Rick0 commented 2 years ago

Version

3.6.2

Reproduction link

github.com

Steps to reproduce

What is expected?

instanceA's and instanceB's $store should be defined

What is actually happening?

instanceA's store is undefined instanceB's store was defined


It appears that after a component has been used as a child component, it can no longer be used as a root component. As of yet I haven't managed to reproduce the bug in a normal client app. See the minimal reproduction repo for an example.

Not sure if this bug should be logged with Vuex or with Vue.