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
Click "Negate store.flag" buttonn any times you like. You will see how store.flag negates, ang how its computed store.negated stays reactive.
Uncheck "Show StoreUser" input. The component will be unmounted.
Check it again, to mount the component back.
Click "Negate" button again - store.negated is not reactive anymore.
Screen.Recording.2022-12-11.at.14.02.35.mov
Expected behavior
I expected the watchEffect(), called within a Setup Store, to be active as long as the store's scope is active. It makes possible for utilities like computedEager() just work in setup stores.
Actual behavior
The watch effect seems to bind not to the store's setup scope, but to the component where the initial useStore invocation happened. Thus, when the component is unmounted, the watch effect is cleared and stopped, leaving the store in a broken and hard-to-debug state.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Reproduction
https://stackblitz.com/edit/github-u4jlt8
Steps to reproduce the bug
store.flag
" buttonn any times you like. You will see howstore.flag
negates, ang how its computedstore.negated
stays reactive.StoreUser
" input. The component will be unmounted.store.negated
is not reactive anymore.Screen.Recording.2022-12-11.at.14.02.35.mov
Expected behavior
I expected the
watchEffect()
, called within a Setup Store, to be active as long as the store's scope is active. It makes possible for utilities likecomputedEager()
just work in setup stores.Actual behavior
The watch effect seems to bind not to the store's setup scope, but to the component where the initial
useStore
invocation happened. Thus, when the component is unmounted, the watch effect is cleared and stopped, leaving the store in a broken and hard-to-debug state.Additional information
No response
The text was updated successfully, but these errors were encountered: