Closed
Description
If we use react-redux
, it's considered a best practice to not to couple React components with Redux state logic like dispatch, React component should not be aware of the existence of Redux at all.
connect
method from react-redux package receives second argument that maps array of callbacks to Redux action creators. So the component just exposes some callback and react-redux does the rest.
See https://github.com/rackt/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options