0

Without redux-thunk, your action creators can still take dispatch as an argument and seemingly do whatever a thunk would:

https://stackoverflow.com/a/33892505/378622

So what's the motivation for redux-thunk, exactly?

Ben G
  • 26,091
  • 34
  • 103
  • 170

1 Answers1

1

Dan Abramov's answer here How to dispatch a Redux action with a timeout? explains it in detail.

This summary is probably not complete, but my take from it is:

  • No need to have dispatch as a prop in components and passing it around
  • Async control flow is more convenient, you can treat other actions like promises without having to wrap them in new Promise() yourself
  • Additional argument getState in actions to read from state
timotgl
  • 2,865
  • 1
  • 9
  • 19