Using dynamic Pinia stores when Vue route changes #2519
Unanswered
Joebayld
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an app that has a handful of dynamic components and each one needs it's own store. I'm having anm issue referencing the correct Pinia store when each route changes. The store id is based off the current route. See code below.
This is the component that creates / uses the store.
This code creates a new store with the given id:
The issue is when I have the route update, the store doesn't because it's originally created with the first components params. Is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions