# React Retux API Reference
# ExtractDispatchers
Ƭ ExtractDispatchers<TTargetProps, TDispatchers>: TDispatchers
Specify dispatchers of the connected Component props.
This helper is for typo prevention.
Type parameters:
TTargetPropsTarget Component Props.TDispatchersProps properties that willdispatchRedux Actions.
# MapStateToProps
Ƭ MapStateToProps<TState, TTargetProps, TDispatchers, TOwnProps>:
(state: TState, ownProps: TOwnProps) => Omit<TTargetProps, TDispatchers>
Specify dispatchers of the connected Component props.
This helper is for preventing typos.
Type parameters:
TStateStore state.TTargetPropsTarget Component Props.TDispatchersProps properties that willdispatchRedux Actions.TOwnPropsContainer Component Own Props.
# MapDispatchToPropsFunction
Ƭ MapDispatchToPropsFunction<TDispatch, TTargetProps, TDispatchers, TOwnProps>:
(dispatch: TDispatch, ownProps: TOwnProps) => Pick<TTargetProps, TDispatchers>
Function form of the mapDispatchToProps.
This is mainly for libraries that extend the action types. e.g. Redux Thunk and Redux Promise.
Type parameters:
TDispatchCustom ReduxDispatchtype.TTargetPropsTarget Component Props.TDispatchersProps properties that willdispatchRedux Actions.TOwnPropsContainer Component Own Props.
# MapDispatchToPropsObject
Ƭ MapDispatchToPropsObject<TAction, TTargetProps, TDispatchers>:
{ [TKey in TDispatchers]: [Action Creators] }
Object form of the mapDispatchToProps.
This is mainly for libraries that extend the action types. e.g. Redux Thunk and Redux Promise.
Type parameters:
TActionActions. Add Thunk Action or Promise Action accordingly.TTargetPropsTarget Component Props.TDispatchersProps properties that willdispatchRedux Actions.
# MapDispatchToProps
Ƭ MapDispatchToProps<TAction, TTargetProps, TDispatchers, TOwnProps>:
MapDispatchToPropsFunction | MapDispatchToPropsObject
This is for Actions are all of type { type: string, ... }.
Otherwise use MapDispatchToPropsFunction or MapDispatchToPropsObject for mixed action types.
Type parameters:
TActionActions. Add Thunk Action or Promise Action accordingly.TTargetPropsTarget Component Props.TDispatchersProps properties that willdispatchRedux Actions.TOwnPropsContainer Component Own Props.
← Retux