how to let sub app use parent app's store? #2589
-
Beta Was this translation helpful? Give feedback.
Answered by
posva
Mar 6, 2024
Replies: 1 comment 2 replies
-
The important part is using only one instance of pinia (only one |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
luqiudi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The important part is using only one instance of pinia (only one
const pinia = createPinia()
and maybe multipleapp1.use(pinia); app2.use(pinia)
. That's where the state is held. Depending on your bundling, you might want to mark pinia as external in sub dependencies