If MyComponent is a functional component use hooks

This means that you don't need to write the connect wrapper at all. You can use hooks for redux is you're using a functional component.

const result : any = useSelector(selector : Function, equalityFn? : Function)


const dispatch = useDispatch()


You can check the option on the connection method in redux:
So the options allow use forwardRef
my code: connect(null,null,null,{forwardRef: true,})(LearnView)
it worked for me


You can use options in connect function.

connect(mapStateToProps, null, null, { forwardRef: true })(wrapper)

Related Query

More Query from same tag