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

hooks与类组件开发方式讨论:容器组件与UI组件 #5

Open
BUPTlhuanyu opened this issue Aug 12, 2021 · 0 comments
Open

Comments

@BUPTlhuanyu
Copy link
Owner

https://medium.com/nmc-techblog/why-you-should-stop-using-the-container-presentational-pattern-in-redux-29b112406128

容器组件订阅了 redux 中的一大块数据,分发给各个UI组件,导致了子组件的重新渲染,其实在类组件中也会有这样的问题,一般的解决办法是拆分以及使用 useMemo,或者 React.memo 来做。但是下一 issue(文章) 会说到 useMemo 的一些需要注意的地方。

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