We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
斗胆提几个问题,不知是否过于愚笨:
The text was updated successfully, but these errors were encountered:
使用observe的数据说明这个数据是mutable的,而对于React来说,更推荐的是使用inmutable的数据,因为React是根据props和state的变化来探测一个组件是否需要执行更新的,而对于一个mutable的数据,改变来他的内容,但是他本身没有变化,如果拿他作为props,则会导致组件可能被shouldComponentUpdate误认为不需要更新的。
确实,现在使用Provider在顶层使用context并不是一个很好的选择,因为context变化之后他的子树层级越多,他的性能消耗越大。所以react-redux也提出了想要一个觉解这个问题的方案,就看react官方会不会考虑来。目前来说,如果你不依赖redux,你自己实现store,是完全可以根据你自己的情况把context尽量放在低层级的,这样可以减少context的更新带来的性能影响。这里没有什么必须要,你完全可以根据自己的情况来实现。
Sorry, something went wrong.
�多谢多谢,受教了🙏
这是一个段落
这是一个引用
样式应该还不错,这样的, 这样的, code
code
function x() { return a + b; }
No branches or pull requests
斗胆提几个问题,不知是否过于愚笨:
The text was updated successfully, but these errors were encountered: