-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[List] Memoize context value #14934
[List] Memoize context value #14934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's currently an issue with shallow rendering + forwardRef + hooks. We need to adjust our test. I have prepared something locally which also improves this test as a whole unless you insist on doing this yourself.
The implementation is fine as-is.
Details of bundle changes.Comparing: 02b6dab...7e18acd
|
@mkermani144 It's a great first pull request on Material-UI 👌🏻. Thank you for working on it! |
Any chance of merging to 3.9.x? Thanks |
@henrylearn2rock Sorry, but that won't be possible since the solution requires the |
@henrylearn2rock v4.0.0-beta.0 is in good shape. You should be able to migrate, starting today. If you want to be more cautious, you can wait a week or two. |
Related to #10778
Memoizing context value is another solution to https://reactjs.org/docs/context.html#caveats