-
Notifications
You must be signed in to change notification settings - Fork 100
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
setState component in react-router, the children componet not rerender #57
Comments
index.js
APP.js
Home.js
Example.js
|
Thx for feedback. working on it... |
I found it just worked well when I run the code that you provide. |
yes, It work well. but, please attention console in react and react-lite, they will work not the same |
还是用中文写吧,英文太麻烦,外国友人遇到同类问题,就让他们用 google 翻译一下。 问题出在 App component 里 setInterval 时,setState 更新视图,但 this.props.children 没有变化,react-lite diff 的时候直接略过了它,而 react 没有。 我觉得这应该是 react 的问题。 不知道 react-lite 这个特性引起了什么实际问题? |
我知道问题了,context 传递不下去。 |
我在APP设置了context, context中的数据变化后,子级组件的context不会变化 |
更新一下 react-lite 到 v0.15.10 版本,问题应该解决了 |
更新后正常了,给力!! |
我使用了react-router用做路由,redux 用作数据流, react-redux 的Provider在Route中。
当使用react-lite时,调用setState时只有当前组件触发重渲染,子组件未重渲染。
如果使用 react 时,则当前组件和子组件都会重渲染
The text was updated successfully, but these errors were encountered: