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

全局状态错乱问题 #5

Open
wuomzfx opened this issue Nov 5, 2019 · 0 comments
Open

全局状态错乱问题 #5

wuomzfx opened this issue Nov 5, 2019 · 0 comments

Comments

@wuomzfx
Copy link
Owner

wuomzfx commented Nov 5, 2019

有一个非常严重的问题:createHoox的返回结果(比如getHoox, useHoox, createContainer)与唯一一个组件实例绑定。

比如const Container = createContainer(Counter)
那么 Container只能用在一个地方!

举个例子,如果在topbar里渲染一次Container,在menu里渲染一次Container。那么当我们调用setHoox的时候,究竟是哪个组件实例的state被修改了?

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

1 participant