-
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
useSelector hook偶现数据不更新的情况 #5164
Comments
CC @Chen-jj |
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
@CastileMan 完整的项目提供一下 |
已经给了demo代码,有进展吗 @Chen-jj |
请问这个问题有进展吗?同样遇到这个问题 |
@Chen-jj 我以前也是HWFC的哦~ |
现在问题解决了吗? |
@mcmicahelchan @azumia 有可复现的 demo 提供一下么? |
@mcmicahelchan 哈哈我就是那个和你同名的师兄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
@tarojs/redux
中useSelector
将useLayoutEffect
直接替换为useEffect
,因此执行顺序出现变化,导致hook返回的数据为旧数据复现步骤
期望行为
useSelector
正确返回更新后的数据报错信息
无报错error信息,只是返回的数据不对
系统信息
Taro CLI 1.3.25 environment info:
System:
OS: Windows 10
Binaries:
Node: 8.9.0 - E:\nodejs\node.EXE
Yarn: 1.3.2 - ~\AppData\Roaming\npm\yarn.CMD
npm: 5.5.1 - E:\nodejs\npm.CMD
补充信息
useLayoutEffect
与useEffect
的执行顺序不同,导致数据被重置为更新前的旧数据The text was updated successfully, but these errors were encountered: