SIGN IN SIGN UP

Remove useRefEffect (#58451)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/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

fbshipit-source-id: 93fb5fb2ded37c0ecc3f803bb558b9e977303b05
P
Pieter De Baets committed
5ef408789feee087dc40f6b25d7d8a8da6412417
Parent: e15b667
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 9/10/2026, 7:03:58 PM