Skip to content
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

Update scheduler.ts #7816

Closed
wants to merge 3 commits into from
Closed

Update scheduler.ts #7816

wants to merge 3 commits into from

Conversation

zhangenming
Copy link
Contributor

No description provided.

@zhangenming zhangenming closed this Mar 3, 2023
@zhangenming zhangenming reopened this Mar 3, 2023
@zhangenming zhangenming closed this Mar 3, 2023
@zhangenming
Copy link
Contributor Author

    const r = ref(0)

    watch(r, () => console.log('1'))
    watchEffect(() => {
      r.value
      console.log('2')
    })
    watch(r, () => console.log('3'))
    watchEffect(() => {
      r.value
      console.log('4')
    })

    r.value = 1

now the rersult is 4-3-2-1
Why not let it be 1-2-3-4?
Is there any reason?
thanks

@zhangenming zhangenming reopened this Mar 3, 2023
@skirtles-code
Copy link
Contributor

I believe this is the problem reported in issue #7576.

I think the fix in #7748 is more accurate than the fix suggested here.

@zhangenming zhangenming closed this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants