0👍
It depends on your use case.
If the variable has a flag or one time use value, you can use the query
for passing it.
But let’s say you have a complex object, on which you would like to perform some computations and then pass it on to child components (route being same).
In that case it is better to use global store. It syncs the data for you so that you can fetch it where ever you would like.
- [Vuejs]-Error while calling the function when on-change event is fired
- [Vuejs]-How to resolve error in Vuetify rules [v-text-field] & computed property
Source:stackexchange.com