Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to remove bindActionCreators boilerplate #32

Closed
piotrwitek opened this issue Nov 17, 2016 · 0 comments
Closed

Document how to remove bindActionCreators boilerplate #32

piotrwitek opened this issue Nov 17, 2016 · 0 comments

Comments

@piotrwitek
Copy link
Owner

piotrwitek commented Nov 17, 2016

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); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant