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

useEffect 行为不符合预期 #1190

Open
menhal opened this issue Nov 21, 2019 · 3 comments
Open

useEffect 行为不符合预期 #1190

menhal opened this issue Nov 21, 2019 · 3 comments
Labels

Comments

@menhal
Copy link

menhal commented Nov 21, 2019

bug描述
描述出现的问题

复现bug的步骤
详见例子 : http://jsrun.pro/PQWKp/edit
点击按钮修改value的值, 第二个useEffect没有监控这个值, 控制台上不应该打印2222.

问题截图

编译环境信息

  • anu 1.6.0

运行环境信息

  • 端版本:Chrome
@menhal menhal added the bug label Nov 21, 2019
@RubyLouvre
Copy link
Owner

就是说第二参数为空数组时,只会触发一次,如果不为空,那么根据是否变动触发

1 similar comment
@RubyLouvre
Copy link
Owner

就是说第二参数为空数组时,只会触发一次,如果不为空,那么根据是否变动触发

@RubyLouvre
Copy link
Owner

先用这里的试试 https://github.com/RubyLouvre/anu/tree/branch3/dist

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

No branches or pull requests

2 participants