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

invoke message.info in watchEffect will cause infinity loop #5553

Open
1 task done
merfais opened this issue Apr 27, 2022 · 1 comment
Open
1 task done

invoke message.info in watchEffect will cause infinity loop #5553

merfais opened this issue Apr 27, 2022 · 1 comment
Assignees

Comments

@merfais
Copy link

merfais commented Apr 27, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

undefined

Environment

"ant-design-vue": "^3.2.2", "vue": "^3.2.26"

Reproduction link

https://stackblitz.com/edit/vue-kde3lv?file=src/App.vue

Steps to reproduce

  1. define a reactive variable
  2. use the variable in watchEffect callback, and use message.info to popup any text
  3. change value of the variable, make watchEffect callback be invoked

What is expected?

watchEffect callback only invoke once, not infinity loop, like use console.log('sth msg')

What is actually happening?

watchEffect callback be invoked infinity loop

@tangjinzhou
Copy link
Member

you can use watch instead watchEffect.

We don't have a better solution for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants