[Vuejs]-Send data through query or from store in Vue

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.

Leave a comment