compose-react-refs icon indicating copy to clipboard operation
compose-react-refs copied to clipboard

Doesn't support React 19 "Cleanup functions for refs"

Open jzhan-canva opened this issue 4 months ago • 0 comments

In react 19, ref callback can return a cleanup function

<input
  ref={(ref) => {
    // ref created

    // NEW: return a cleanup function to reset
    // the ref when element is removed from DOM.
    return () => {
      // ref cleanup
    };
  }}
/>

however this is not supported in compose-react-refs

jzhan-canva avatar Sep 24 '25 07:09 jzhan-canva