-
Notifications
You must be signed in to change notification settings - Fork 47.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
Support ref cleanup function for imperative handle refs #28910
Conversation
Comparing: cf5ab8b...964ca88 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
should these double-invoke in StrictMode too then? would it be worth adding a test for an imperative ref in the StrictMode tests? https://github.com/facebook/react/blob/main/packages/react-reconciler/src/__tests__/StrictEffectsModeDefaults-test.internal.js#L411 maybe "DOM refs" isn't the best terminology for me to use in reactjs/react.dev#6777 – it doesn't seem like that encompasses imperative handle refs clearly |
Support ref cleanup function for imperative handle refs DiffTrain build for commit ed71a3a.
@noahlemen Additional StrictMode test would be nice. It "just" works already: https://codesandbox.io/p/sandbox/ref-cleanups-forked-ccp74m?file=%2Fsrc%2Findex.js%3A35%2C46 |
Support ref cleanup function for imperative handle refs DiffTrain build for commit ed71a3a.
Support ref cleanup function for imperative handle refs