Is there a recommended way to propagate data through vue components? What I want to do is get data from the backend once
and propagate it to various locations in my project, but I can't find the right strategy.
sessionStorage: Works great and resets when refreshing/closing the window, but once you need to create a target="_blank"
anchor tag it doesn't.
P粉0221405762024-03-27 12:18:55
There are some good arguments as to why Vuex is better than local storage:
You can also try composable items. They are reusable functions (similar to mixins) in composition-api (in vue2 the composition-api plugin is required, in vue3 it is built-in). It can also be where you store your data