Re:Redux Blog Example
by olegakbarov on Saturday September 12, 2015 @10:04AM
(#10208101)
I should definitely take a closer look at this approach. Thank you.
PS You are also welcome to PR =)
PS You are also welcome to PR =)
The common pattern I've seen is:
- Dispatch simple actions that contains 'just' a URL
- Have a middleware to take those actions, make the API call (based on the URL in the action), and then dispatch further progress, success and/or failure actions
- Receive the API data in your reducer and transform it before adding it to your store.
That's a pattern that works really nicely and is crazy easy to write tests for.
> 4. We do have one! (checkout .eslintrc) I feel like it is actually even more 'strict' than default Airbnb's one.
Oops sorry!