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
The example of bindActionCreators does not pass generic parameters. Either, optionally pass only one generic parameter: bindActionCreators<ActionCreatorsMapObject<Types.RootAction>>.
Without generic parameters, react component will report not assignable error. The latest redux's bindActionCreators also accepts exact 2 generic parameters. So the example seems outdated.
My current workaround is bindActionCreators<any, any>:
But the Props is then inferred as type any, which is unacceptable for me.
If I change to bindActionCreators<any, ActionCreatorsMapObject<RootAction>>, then my react component starts to report not assignable error again...
The example of
bindActionCreators
does not pass generic parameters. Either, optionally pass only one generic parameter:bindActionCreators<ActionCreatorsMapObject<Types.RootAction>>
.Without generic parameters, react component will report not assignable error. The latest redux's bindActionCreators also accepts exact 2 generic parameters. So the example seems outdated.
My current workaround is
bindActionCreators<any, any>
:But the
Props
is then inferred as typeany
, which is unacceptable for me.If I change to
bindActionCreators<any, ActionCreatorsMapObject<RootAction>>
, then my react component starts to report not assignable error again...I am really confused about the correct usage of
bindActionCreators
.Anyone can help? Thanks!
The text was updated successfully, but these errors were encountered: