score:-1

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)

and

const dispatch = useDispatch()

score:3

You can check the option on the connection method in redux: https://react-redux.js.org/api/connect
So the options allow use forwardRef
my code: connect(null,null,null,{forwardRef: true,})(LearnView)
it worked for me

score:26

You can use options in connect function.

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

Related Query

More Query from same tag