forked from BolajiOlajide/a_socials
-
Notifications
You must be signed in to change notification settings - Fork 7
REACT Best Practices Actions
Patrick Alvin Luwum edited this page Jun 20, 2018
·
1 revision
1. Use bindActionCreators for dispatching actions Redux’s event dispatching system is the heart of its state management functionality. However, it can be tedious to pass down the dispatch function as a prop to every component that needs to dispatch an action.
Avoid this.
Avoid this.
instead do this
In the above code filterTalentPoolDataBySkills
in bindActionCreators
is available as this.props.filterTalentPoolDataBySkills
to dispatch your action. It will make it easier to maintain the code for long run.