React needs to be installed

redux

npm i redux
Copy the code

react-redux

npm i recat-redux 
Copy the code

Use of react-Redux developer tools

Yarn add redux-devtools-extension NPM I redux-devtools-extension store import {composeWithDevTools} from 'redux-devtools-extension' const store = createStore(allReducer,composeWithDevTools(applyMiddleware(thunk)))Copy the code

Redux asynchronous

Yarn add redux-thunk NPM I redux-thunk and configure it in storeCopy the code

Install the routing

NPM install --save react-router-domCopy the code

Message subscription-publish mechanism

1.Tool library: PubSubJS2.NPM install pubsub-js --save3.Use:1)	import PubSub from 'pubsub-js' / / introduction
    2)	PubSub.subscribe('delete'.function(keyName, data){ 
    		//keyName: 'delete', which is the keyName
        	/ / data: is the value
    	}); / / subscribe
    3)	PubSub.publish('delete', data) // Publish the message
Copy the code