Redux
-
By default state are component specific a. you can pass state in parent-child relationship but we can not use state which have not any parent-child relation.
b. Here we use redux, in redux we store all state in one place called "store".
-
a. npm install redux react-redux b. npm install --save react-router-redux c. npm i --save redux-logger d. npm install --save redux-thunk
-
https://www.freecodecamp.org/news/how-to-use-redux-in-reactjs-with-real-life-examples-687ab4441b85/
-
http://jamesknelson.com/can-i-dispatch-multiple-actions-from-redux-action-creators/