|
|
|
|
|
by mharroun
2258 days ago
|
|
Redux always had to much boilerplate for me to prefer it. The last couple years I have been using the new Context API and spliting my app state out by creating a global context, and many domain specific contexts where the context contains both the data and functions used to work with that data. Typescript + state with data and functions created a great api per domain. I found this approach just as clean but with less boilerplate. Though redux does have some performance and tooling benefits. |
|
Yeah, the boilerplate setting up the middleware and initial reducer isn't fun... but it's been really rewarding and the react-redux hook has been a godsend.
https://www.npmjs.com/package/react-redux-actions-hook