If the ownProps
parameter is specified, React Redux will pass the props that were passed to the component into your connect functions. So, if you use a connected component:
import ConnectedComponent from './containers/ConnectedComponent';
<ConnectedComponent user={'john'} />
The ownProps
inside your mapStateToProps()
and mapDispatchToProps()
functions will be an object:
You can use this object to decide what to return from those functions.