my favorite tip with redux connect & compose to reduce boilerplate (with HOCs):
const mapStateToProps = state => ({ ... }); export default compose( withRouter, withStyles, ... connect(mapStateToProps) )(MyComponent);
Could you explain how it works though ? if you have your above code as a ComponentA, and lets say I call the component with some props like so. What happens inside of it ?
Thanks in advance
this is explanation: stackoverflow.com/questions/413578...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
my favorite tip with redux connect & compose to reduce boilerplate (with HOCs):
Could you explain how it works though ? if you have your above code as a ComponentA, and lets say I call the component with some props like so. What happens inside of it ?
Thanks in advance
this is explanation: stackoverflow.com/questions/413578...