When looking into React 19 changes, it appears that ref can now be overridden by prop spread patterns which can cause unexpected behavior. Investigate the codebase and make sure that we are not accidentally spreading props where a ref could now be passed.
Pattern fixed:
// Before (incorrect)
const Component = forwardRef((props, ref) => (
<Child ref={ref} {...props} />
))
// After (correct)
const Component = forwardRef((props, ref) => (
<Child {...props} ref={ref} />
))
If necessary, refs should be merged.
When looking into React 19 changes, it appears that
refcan now be overridden by prop spread patterns which can cause unexpected behavior. Investigate the codebase and make sure that we are not accidentally spreading props where arefcould now be passed.Pattern fixed:
If necessary,
refs should be merged.