Skip to content

Instantly share code, notes, and snippets.

@jethrolarson
Last active May 10, 2017 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jethrolarson/c3b69bc21010dd9c883211f79b90ad79 to your computer and use it in GitHub Desktop.
Save jethrolarson/c3b69bc21010dd9c883211f79b90ad79 to your computer and use it in GitHub Desktop.
options for async actions in redux

Note: These aren't necessarily mutually exclusive. E.g. we may want to use promise with thunk to get better ergonomics for certain kinds of effects.

Learnability: 4
Testability: 4
Happy path: 4
Purity: 2
SLOC: 14

  • Doesn't do a lot for you. Just makes it easy to do async actions

Learnability: 3
Testability: 4
Happy path: 4
Purity: 3
SLOC: 150

Learnability: 2
Testability: 4
Happy path: 4
Purity: 4
SLOC: 140

  • Requires some stream lib like Rx or Most

Learnability: 1
Testability: 1
Happy path: 4
SLOC: 1400

  • Easy to sequence async tasks and group them once you get the hang of it
  • Lots of helpers for debouncing and more
  • procedural

There's other options I excluded or didn't investigate. If there's one I should look at let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment