-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
使用ref,导致useDidShow多次调用 #5050
Comments
CC @Chen-jj |
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
@Chen-jj
ref如果这样循环去赋值, |
如果在当前页面使用 |
Chen-jj
added a commit
that referenced
this issue
Dec 17, 2019
计算循环 ref 跑 createData 前,需要先把 Current.index 置空
luckyadam
pushed a commit
that referenced
this issue
Dec 19, 2019
计算循环 ref 跑 createData 前,需要先把 Current.index 置空
ZakaryCode
pushed a commit
that referenced
this issue
Dec 20, 2019
计算循环 ref 跑 createData 前,需要先把 Current.index 置空
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
在小程序中使用 ref ,在切换底部 Tab 时,比如,当页面A,切换到页面B,再切换回A页面,此时A页面的
useDidShow
会调用2次复现步骤
期望行为
切换tab的时候,useDidShow 只调用一次
报错信息
无
系统信息
Taro CLI 1.3.23 environment info:
System:
OS: macOS 10.14.4
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
The text was updated successfully, but these errors were encountered: