-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
refactor(computed): deprecated computedRunners #1458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fetch new commit
fetch: rebase
That would mean the normal effect has to run twice - which is exactly what we are trying to avoid. |
I simulated a special case of const reactVal = reactive({})
let computedVal = computed(() => reactVal.foo)
let effectVal
effect(() => {
effectVal = reactVal.foo + computedVal.value
console.log('normal effects trigger!')
})
console.log('--- Test begin ---')
reactVal.foo = 1 Regardless of whether The reason is that No matter who executes So, I didn’t see the necessity of using |
Yeah you are right. This was necessary in the case of using an async scheduler (exposed as |
Thanks for your explanation let me understand the historical reason here. |
There might be some clean up left to do.
And it's set by |
Has been cleaned up in [chore: remove outdated options]. |
Even if
normal effects
that depends oncomputed effects
is executed first, After the execution ofcomputed effects
will also triggernormal effects
again.So it seems we don't need
computedRunners
?