You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am losing my mind trying to understand why my computedAsync in a pinia store gets recomputed the first time a component is loaded, but is not as soon as I navigate away from the component and back to it. Am I missing something obvious?
The store looks like this:
When the component above is first loaded clicking the button increments the counter. If I navigate somewhere else in the webapp then back the button does nothing anymore.
I have tried to debug the issue and on the second page it looks like the "refresher" ref doesn't have any dependencies anymore, it does get updated but that doesn't trigger a recompute of testData.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I am losing my mind trying to understand why my computedAsync in a pinia store gets recomputed the first time a component is loaded, but is not as soon as I navigate away from the component and back to it. Am I missing something obvious?
The store looks like this:
... and I use it like this:
When the component above is first loaded clicking the button increments the counter. If I navigate somewhere else in the webapp then back the button does nothing anymore.
I have tried to debug the issue and on the second page it looks like the "refresher" ref doesn't have any dependencies anymore, it does get updated but that doesn't trigger a recompute of testData.
Any pointers would be really appreciated!
Thanks
Beta Was this translation helpful? Give feedback.
All reactions