Redux-HOR
Higher-order Redux is a utility belt for Redux that makes heavy use of higher-order reducers to provide:
- Reduced boilerplate 🔩
- Increased modularity 📦
- Development speedup 🚄
Oh, btw... Higher-order reducer is a function that takes a reducer argument and returns a new reducer:
HigherOrderReducer<State, Action> =
Installation
yarn add redux-hor
Quick start
Here's a standard reducer that we all know an love:
Compare it with HoR style:
onAction'UPDATE_AUTHOR',merge)initinitialState