Replies: 1 comment 5 replies
-
That is not exactly true. That said my own experience with other reactive libraries is that having a |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Vue offers two ways of effect tracking:
watchEffectandwatch.When
watchis being used one can be explicit about all refs which should be tracked, vs inwatchEffectjust all refs which are used inside are tracked automatically, but there is no way of excluding refs of being tracked.Implementation:
I would imagine a function with the same signature as
unrefjust with the difference that the value isn't tracked as well:In the example above the
watchEffectwould only run if refachanges but not when refbchanges.Benefits
watchvswatchEffectwatch,watchEffect) doesn't matter to themOther references
Libraries like
solid,svelteandangularoffer the same functionality:qwikits done the other way around with a function calledtrack()https://qwik.dev/docs/components/tasks/#trackBeta Was this translation helpful? Give feedback.
All reactions