and react-redux redux conjunction with each other

react-redux need not be used alone in conjunction with the use of redux
1.react-redux mainly consists of two parts Provider connect

Provider must have a value of attribute store store principle is the context passed by value across components
connect: the first high-order component has a function of two parameters (function must return an object) mapStateToProps mapDispatchToProps
mapStateToProps this parameter is a function State
mapDispatchToProps this parameter is a function dispatch

* */

 

The state data and methods mapped onto this.props! ! !

Guess you like

Origin www.cnblogs.com/PeiGaGa/p/11032788.html