Skip to content

Document how to remove bindActionCreators boilerplate #32

Closed
@piotrwitek

Description

@piotrwitek

remove bindActionCreators boilerplate using object literal with actions instead of mapDispatchToProps function

const stateToProps = (storeState: IRootReducer) => ({ 
  currencyRates: storeState.currencyRates, 
  currencyConverter: storeState.currencyConverter 
}); 
 
const actionsToProps = Object.assign({}, currencyConverterActions); 
 
export default connect(stateToProps, actionsToProps)(CurrencyConverterContainer); 

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions