Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Better async redux saga

Better async redux saga

Slides on Generator Functions and Redux Saga

Kushan Joshi

June 28, 2017
Tweet

Other Decks in Technology

Transcript

  1. GENERATORS What are Generator Functions ? Are functions that can

    hold state They can be paused / resumed 
 on demand.
  2. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  3. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  4. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  5. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  6. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  7. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  8. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  9. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  10. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  11. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  12. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  13. REDUX PROBLEM Store There are a lot of tools to

    solve this problem. Async-Action
  14. REDUX SAGA It runs the generator functions 
 for you.

    It gives you helper functions to interact with Redux
  15. GENERATORS The whole point of generators is that you can

    manipulate them while they are suspended.
  16. GENERATORS Think of it as a conversation between the code

    that runs the generator and the generator itself. Generator Redux Saga
 (runner)
  17. GENERATORS Which is why it is so easy to test

    a redux saga, at every yield @
  18. REDUX SAGA TAKE AWAYS Generator functions are fun Redux Saga

    is an amazing solution to the async action problem