3. 1. REST API
a. Postman
2. Redux-Saga
What you will learn today
4. What you will do today
● Add boilerplate to run Redux-Saga
○ yarn add apisauce jsuri lodash moment moment-timezone redux-saga yarn
○ Add boilerplate code
● Add TasksSaga
● Add REST API
● Handling network connection
● Generator Functions
5. TODO App - REST Device API
https://documenter.getpostman.com/view/2287673/RWM6wrX5
9. Redux Saga: Advantages
● Write Async code a synchronous
● More readable
○ I.e. Write business logic in a single location
● Easy Testing
● Written as generator functions
10. Generator Functions
● Generator functions are functions that can start, paused, and resumed. It maintains its
state
● yield defines one iteration
11. Redux-Saga: Helper functions
● take(takeLatest, takeEvery): handle an action
● call: call a function that return promise
● put: generate a new action
● select: get data from redux
● fork: fork a new “thread”
● channel