Reactive $store in all app

I have a button in navbar that opens a modal for me where I choose a user name that I save in the store.
This name must appear in several components of my application.
How can I do ?

br
Max

Don’t know which store you are using, but what’s store there should be reactive, so simply import the store in your components and get the value from it that you need?

Hi @maxdiable
You can use a state with pinia. and if action is needed to be taken you can just use watchers. Docs link of PINIA
I hope this helps.

hi i use vuex store.
my problem is that:
the variable I have in the store I modify it in a component external to the others, so if I change it in that component in order to view the new value I have to refresh the page.

br
Max

Then it seems like it’s not reactive. Can you show us your code?

hi,
i found a solution :slight_smile:

br
Max