vue state management

I have response that come from my backend server is return details and id and I want to send this id from route to other route without navigate its like add specific item to favorites route it slould use vue state mangment
3 Replies
Wolle
Wolle11mo ago
If you want a state shared between two components you can a) put that state in a parent component and use props/events in both components, or b) use a store (like pinia) and save it there. (I would suggest using b) If it is a detail you give that component and call it via router, you can add those infos as params to the route.
AparAwasthi
AparAwasthi11mo ago
Just as @daswolle said if you want to access data on different routes I would prefer to use store like pinia or Vuex for state management.
7AYDER
7AYDER11mo ago
thx bro
Want results from more Discord servers?
Add your server
More Posts