-
Notifications
You must be signed in to change notification settings - Fork 4.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
Compose: Add 'useLatestRef' hook #41190
Conversation
Size Change: +31 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
I'm hesitant about this one, the reason is that this hook might become useless when we get the newly proposed The RFC hasn't been accepted yet but it's close I think and we could potentially start using the polyfill version in the current React version at that point. |
That's a good point—no need to introduce a new public API if we have to deprecate it soon. |
I'm going to close this one, in favor of better core hook :) |
What?
Follow-up to #39911 (comment)
PR moves the
useLatestRef
hook from the Components package utils (the package didn't use it) into Compose package.I also updated the Quote v2 block to use the new hook.
Testing Instructions
Unit tests are passing.