-
-
Notifications
You must be signed in to change notification settings - Fork 270
[composite] Rollback CompositeList to use counter-based update
#2880
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
Conversation
commit: |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| // `mapTick` intentionally uses a counter-based update rather than unique objects. | ||
| // This is because the chance of precision loss in the counter is extremely low, | ||
| // while `mapTick` updates relatively often and is more memory-efficient. | ||
| const [mapTick, setMapTick] = React.useState(0); |
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.
The comment is too long relatively to the importance of that line of code. I'd compact it in a single-line comment.
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.
Thanks for reviewing and pushed a commit to shorten it
4ccac87
LukasTy
left a comment
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.
LGTM.
Thanks for taking care of it. 🙏
CompositeList to use counter-based update
Bundle size report
|
This PR just rollbacks
mapTickin theCompositeListto use counter-based update for the better memory-efficiency.Theads: #2675 (comment)