Home Reference Source Repository

Function

Static Public Summary
public

bindActionDispatchers(actionCreators: Object | function(ownProps: Object): Object): function(dispatch: function): actionDispatcher

bindActionDispatchers - curries mapDispatchToProps with bindActionCreators to simplify React action dispatchers.

Static Public

public bindActionDispatchers(actionCreators: Object | function(ownProps: Object): Object): function(dispatch: function): actionDispatcher source

import bindActionDispatchers from 'bind-action-dispatchers'

bindActionDispatchers - curries mapDispatchToProps with bindActionCreators to simplify React action dispatchers.

Params:

NameTypeAttributeDescription
actionCreators Object | function(ownProps: Object): Object

object with action creator properties or function taking ownProps and returning object with action creators.

Return:

function(dispatch: function): actionDispatcher

a dispatchable action that can be passed directly to mapDispatchToProps argument of connect.