Hands-on practice for this lecture. Write the code, see it run, understand the pattern.
Exercise 1 of 1
Four questions on saga HTTP effects: put vs dispatch, yield vs await, whether result actions are intercepted by the root saga, and the purpose of the PENDING dispatch.
Four questions on saga HTTP effects: put vs dispatch, yield vs await, whether result actions are intercepted by the root saga, and the purpose of the PENDING dispatch.
1Inside a worker saga, what is the saga equivalent of dispatch(action)?
2Why does a worker saga use yield axios.get(url) instead of await axios.get(url)?
3The worker saga dispatches FETCH_TASKS_FULFILLED via yield put(). Does the root saga intercept this action?
4What does yield put({ type: FETCH_TASKS_PENDING }) do before the HTTP request fires?
0/4 answered