Skip to content

Remove useRefEffect (#58451) - #58451

Closed
javache wants to merge 1 commit into
react:mainfrom
javache:export-D114349280
Closed

Remove useRefEffect (#58451)#58451
javache wants to merge 1 commit into
react:mainfrom
javache:export-D114349280

Conversation

@javache

@javache javache commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary:

React 19 now supports this natively by returning a cleanup callback from the ref setter.

The only caveat is that if a ref handler throws, the runtime will still invoke the ref setter with null on unmount.

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D114349280

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 10, 2026
@meta-codesync

meta-codesync Bot commented Sep 10, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114349280.

@meta-codesync meta-codesync Bot changed the title Remove useRefEffect Remove useRefEffect (#58451) Sep 10, 2026
javache added a commit to javache/react-native that referenced this pull request Sep 10, 2026
Summary:
Pull Request resolved: react#58451

React 19 now supports this natively by returning a cleanup callback from the ref setter.

The only caveat is that if a ref handler throws, the runtime will still invoke the ref setter with null on unmount.

Changelog: [Internal]

Differential Revision: D114349280
Summary:
Pull Request resolved: react#58451

React 19 now supports this natively by returning a cleanup callback from the ref setter.

The only caveat is that if a ref handler throws, the runtime will still invoke the ref setter with null on unmount.

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D114349280
@meta-codesync meta-codesync Bot closed this in 5ef4087 Sep 10, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Sep 10, 2026
@meta-codesync

meta-codesync Bot commented Sep 10, 2026

Copy link
Copy Markdown

This pull request has been merged in 5ef4087.

@javache
javache deleted the export-D114349280 branch September 11, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant