Open tribou opened 6 years ago
Another interesting spin on this concept:
https://github.com/infinitered/reduxsauce
Downside is it doesn't adhere to the Flux Standard Action shape. Also, the lib is used by boilerplate that relies heavily on redux-saga
for moving all side effects out of action creators (rather than using redux-promise-middleware
. To compensate, if we used this lib, it might make the most sense to use redux-observable
more frequently. But with observables being inherently difficult to debug still, that doesn't sound like a good trade-off.
Redux docs offers example of creating a reducer based on configuring action handlers: https://redux.js.org/recipes/reducing-boilerplate
The idea would be to find a harmonious balance to hide much of the redux boilerplate behind tests that expose a configuration API. This is similar to how Hapi.js hides implementation details by exposing an extensive configuration API. We would want to balance where to pass functions and where to pass strings/objects. i.e. redux-config might have too much magic?
This would help because: