Session 10: REDUX & MORE ...
๐น Basic Reduxโ
1. Theoryโ
2. Usage with Reactโ
3. Diagramโ
https://kuanhsuh.github.io/2017/09/28/What-s-Redux-and-how-to-use-it/
4. Install packages: redux, react-reduxโ
npm install --save redux
npm isntall --save react-redux
npm isntall --save --dev redux-devtools-extension
5. Coding:โ
- actions / types.js (constants)
- actions / index.js
- reducers / index.js
- components
- root reducers (store.js)
- store (store.js)
- App.js (config Provider with store)
6. Debug:โ
- Download tool: add react redux tool (chrome)
๐น Additional Reduxโ
7. Redux Thunkโ
- Install: npm install --save redux-thunk
- Actions: PENDING, SUCCESS, ERROR
- Async Action (axios / fetch)
- Config middleware (store.js)
8. Redux Toolkitโ
9. Redux Saga (Read more)โ
- https://redux-saga.js.org/docs/introduction/BeginnerTutorial.html
- Install: npm install --save redux-saga / yarn add redux-saga
- sagas
- rootSagas