Redux 4 Ways

Implementations of Thunk vs Saga vs Observable vs Redux Promise Middleware in 10 minutes.

Nader Dabit
React Native Training

--

At the last React Native online meetup, I gave a presentation on the differences of Thunk vs Saga vs Redux Observable (see slides here).

These libraries offer ways to handle side effects or asynchronous actions in a redux application. For more information on why you may need something like this, see this link.

I thought I would take this one step further and not only create a repo for viewing and testing these implementations, but walk through how they are implemented step by step and add one more implementation, Redux Promise Middleware.

When I first started with redux, wrapping my head around these asynchronous side effect options was overwhelming. Even though the documentation was not bad, I just wanted to see the most absolute basic implementations of each in action to give me a clear understanding of how to get started with them without wasting a bunch of time.

In this tutorial, I’ll walk through a basic example of fetching and storing data in a reducer using each of these libraries.

--

--

React Native Training
React Native Training

Published in React Native Training

Stories and tutorials for developers interested in React Native

Nader Dabit
Nader Dabit

Written by Nader Dabit

Full Stack Product Engineer, Author, Teacher, Director of Developer Relations at Avara

Responses (17)