Skip to content

Latest commit

 

History

History
70 lines (42 loc) · 2.03 KB

README.md

File metadata and controls

70 lines (42 loc) · 2.03 KB

Hello Async

To demonstrate all kinds of ways to implement async with React & Redux.

If you like this repository, please ⭐ it and help to spread the word! ❤️

Diffrent ways to implement async

  1. Writing Async Code Inline
  2. Extracting Async Action Creator
  3. Use Redux Thunk
  4. Use Redux Saga
  5. Use Redux Logic

Oncoming

  1. Use Redux Loop

My favorite solution isn't in the list

  1. 🍴 Fork this project and submit a PR.
  2. 👉 creating an issue.

About the demo projects

In each demo project, we try to implement a notification feature:

  • Click buttons to show notifications.
  • Each notification auto dismiss after 5 seconds.
  • Multiple notifications are allowed simultaneously.

Motivation

This repo is inspired by this answer on stackoverflow.

The accepted answer is awesome.

Once again Dan Abramov shows how thoughtful the Redux design choices are, and how he excels in explaining them.

But there is something missing:

  1. No runnable sample projects, just some code snippets.
  2. No sample code for other alternatives, such as:
    1. Redux Saga
    2. Redux Logic

This repo is trying to add the missing things:

  1. Runnable projects. You can download and run them without modification.
  2. Provide sample code for more alternatives:
    • Redux Saga
    • Redux Logic
    • ...

How to run

Take Writing Async Code Inline for example:

git clone git@github.com:tylerlong/hello-async.git
cd  hello-async/async-code-inline
yarn install
yarn start