Great post! I went from "why is he calling actions events" to "why weren't actions called events in the first place??" I love the idea of using a status enum instead of a combination of loading, error, data, etc.
One thing... Unless I misunderstand what you're saying about canceling an async thunk request, you can just ignore the success action if the fetch has been canceled:
Great post! I went from "why is he calling actions events" to "why weren't actions called events in the first place??" I love the idea of using a
status
enum instead of a combination ofloading
,error
,data
, etc.One thing... Unless I misunderstand what you're saying about canceling an async thunk request, you can just ignore the success action if the fetch has been canceled:
Here's a working codesandbox: codesandbox.io/s/redux-thunk-cance...
Looking forward to part 2!