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

父子组件消费 model,子组件 useEffect 内使用改动 model 父组件无法同步问题 #83

Closed
WuHuSa opened this issue Dec 9, 2021 · 6 comments

Comments

@WuHuSa
Copy link

WuHuSa commented Dec 9, 2021

类似 #54 ,在1.1.2修复了此问题,1.1.4以后就又出现了

demo: https://codesandbox.io/s/todo-app-with-hox-forked-p7rkt?file=/src/Test.js

@WuHuSa WuHuSa changed the title react 组件 中 useEffect 内使用 hox 封装后的 model 会有数据不同步问题 父子组件消费 model,子组件 useEffect 内使用改动 model 父组件无法同步问题 Dec 10, 2021
@my3188
Copy link

my3188 commented Dec 11, 2021

确实存在这样的问题

@Loserkeys
Copy link

1.1.2测试是可以的。建议官网修复下

@WuHuSa
Copy link
Author

WuHuSa commented Feb 11, 2022

1.1.2 和 1.1.3 正常是因为把useEffect换成useAction了,1.1.4之后又改回 useEffect了,原因是 #63 ,横竖都有问题,也许这就是正在设计2.0.0-beta.0 的原因吧

@awmleer
Copy link
Member

awmleer commented Feb 11, 2022

复现出来了,我修复一下

@awmleer
Copy link
Member

awmleer commented Feb 11, 2022

b865438 已修复

非常抱歉时隔两个月才处理,今天我发布一个 patch 版本

@awmleer awmleer closed this as completed Feb 11, 2022
@awmleer
Copy link
Member

awmleer commented Feb 11, 2022

v1.1.6

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

No branches or pull requests

4 participants