How to better support multiple stores with the same functionality in the same component. #2765
Unanswered
wucheng666
asked this question in
Help and Questions
Replies: 1 comment 2 replies
-
If the state used by the component is not used anywhere else in the app, just use a composable (that will be local to the component) and ditch the store. If not, then use a Map in the store and generate uuids when creating the components to ensure a specific data set for different components. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In ① and ②, "Component2" is reused and uses the same pinia store. When I initialize the store data in ②, the data in ① will be overwritten(because they use the same store).
And when I close ②, the data of Component2 in ① is also wrong. Is there any good solution for this issue that supports multiple stores?
Note:
Beta Was this translation helpful? Give feedback.
All reactions