|
|
|
|
|
by sli
3024 days ago
|
|
> Asynchronous actions feel, to me, that they belong at the component layer where niceties such as spinners are being rendered, and then the backing store is updated with the results of the triggered action. This is exactly how thunks work, you just fire them from your component as a Redux action. I use thunks primarily for when an action needs to get data from an API and insert it into the store (e.g. on login). Inverting the question, why would I want my presentational components to do a bunch of extra work beyond presenting? Calling an API is not presentational. |
|