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
-
Vue offers two ways of effect tracking:
watchEffect
andwatch
.When
watch
is being used one can be explicit about all refs which should be tracked, vs inwatchEffect
just 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
unref
just with the difference that the value isn't tracked as well:In the example above the
watchEffect
would only run if refa
changes but not when refb
changes.Benefits
watch
vswatchEffect
watch
,watchEffect
) doesn't matter to themOther references
Libraries like
solid
,svelte
andangular
offer the same functionality:qwik
its done the other way around with a function calledtrack()
https://qwik.dev/docs/components/tasks/#trackBeta Was this translation helpful? Give feedback.
All reactions