-
Notifications
You must be signed in to change notification settings - Fork 418
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
refactor: change memoization of margins to support the rule of hooks #6875
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Jun 14, 2024 8:58 AM (UTC)
|
stipsan
force-pushed
the
refactor-image-tool-resize
branch
from
June 10, 2024 09:21
0510d1b
to
75d5769
Compare
stipsan
force-pushed
the
refactor-regision-with-interesect-memoization
branch
from
June 10, 2024 09:24
de2cca0
to
ca084e4
Compare
stipsan
force-pushed
the
refactor-image-tool-resize
branch
3 times, most recently
from
June 12, 2024 18:02
464b451
to
b4eb70d
Compare
stipsan
force-pushed
the
refactor-regision-with-interesect-memoization
branch
2 times, most recently
from
June 12, 2024 18:06
3ee55ba
to
c19cffb
Compare
stipsan
force-pushed
the
refactor-regision-with-interesect-memoization
branch
from
June 13, 2024 15:02
c19cffb
to
7a83448
Compare
stipsan
force-pushed
the
refactor-regision-with-interesect-memoization
branch
from
June 14, 2024 08:47
7a83448
to
c183a5e
Compare
juice49
approved these changes
Jun 14, 2024
Nice! Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
By destructuring the array, which is guaranteed to always be a
[number, number, number, number]
tuple, the memoization is no longer violating the rules of hooks by overriding how deps are specified inuseMemo
. And it no longer callsJSON.stringify
on every single render.Thus it can also be compiled by React Compiler.
What to review
Presence circles should work like before in general, and slightly faster in https://test-compiled-studio.sanity.build
Testing
Existing tests should cover it.
Notes for release
N/A