Now we need to create the function, it takes two parameters state and ownProps. We return the properties that we want to make available. So we are setting the state to props so we can use in the page functionality.

functionmapStateToProps(state,ownProps){return{title:state.title};}

mapDispatchToProps lets us expose which dispatch methods we want to have available. Leaving it of leaves all dispatches available.

Now we can dispatch a action. dispatch then the name of the action and what you want to pass in.

this.props.dispatch(nameOfAction.nameOfAction(this.state.title))

This is the basics of redux. A good addition to redux is the redux dev tool :-)