Nice article, and an interesting concept. It sounds to me like you still end up with almost as much boilerplate though. You still need to write reducers (with useReducer), and you need to set up a store. At that point, you basically have a hooks-first Redux. React-connect provide hooks which allow you to access the store (using selectors, so here you do get more boilerplate), so it is still compatible with modern redux.
Personally I see problems with keeping the state alongside the view, especially when scaling, as your view layer would become inflexible and harder to change compared with the view layer as a state consumer.
Considering this library still requires some setup, maybe just plain useReducers or useContexts are enough for simple apps. If have greater needs than that I would still prefer redux I believe.
But I really enjoyed the idea presented. It is a very creative and cool use of context + hooks!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article, and an interesting concept. It sounds to me like you still end up with almost as much boilerplate though. You still need to write reducers (with useReducer), and you need to set up a store. At that point, you basically have a hooks-first Redux. React-connect provide hooks which allow you to access the store (using selectors, so here you do get more boilerplate), so it is still compatible with modern redux.
Personally I see problems with keeping the state alongside the view, especially when scaling, as your view layer would become inflexible and harder to change compared with the view layer as a state consumer.
Considering this library still requires some setup, maybe just plain useReducers or useContexts are enough for simple apps. If have greater needs than that I would still prefer redux I believe.
But I really enjoyed the idea presented. It is a very creative and cool use of context + hooks!