You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
External property ref is always overridden with value undefined #2251
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
React: 19.1.1
Redux: 5.0.1
React Redux: 9.2.0
What is the current behavior?
Whe wrapping a component with connect without passing the option forwardRef set to true, the wrapped component always receives a prop ref with value undefined overriding any other prop named ref:
functionWrappedComponent(props){const{ref}=props// ref will always be undefined when wrapped within connect like below.return<panref={ref}/>}functionHocComponent(props){const[wrapperRef,setRef]=useState(null)// The current behavior of connect would override the ref!return<WrappedComponentref={setRef}{...props}/>}exportdefaultconnect(...)(HocComponent)
What is the expected behavior?
A passed property ref is passed to the wrapped component, when the option fowardRef is not present or falsy.
Which browser and OS are affected by this issue?
No response
Did this work in previous versions of React Redux?
Unfortunately I cannot get the "Test Published Artifact expo (pull_request)" to pass for the pull request #2252.
When I run yarn install with node-22.18.0 as suggested by some internet search results, my local yarn.lock does not get changed.
Can I run the failing test locally on my machine to fix the issue?
Any suggestions on how to fix this?
It seems that this is a general problem as pull request #2246 seems to suffer from the same problem.
Activity
PSpSynedra commentedon Aug 26, 2025
Unfortunately I cannot get the "Test Published Artifact expo (pull_request)" to pass for the pull request #2252.
When I run yarn install with node-22.18.0 as suggested by some internet search results, my local yarn.lock does not get changed.
Can I run the failing test locally on my machine to fix the issue?
Any suggestions on how to fix this?
It seems that this is a general problem as pull request #2246 seems to suffer from the same problem.