There is certainly a massive bias in my opinion, but I must say that I am finding it a breath of fresh air. I’ve been using it aggressively for well over a week now, ironing out the initial bugs and performance issues. Its an all-in-one, zero configuration, global state library! To top it all off, it uses Hooks as its mechanism to integrate with components. This is a 3rd party wrapper around redux. My mind made up, I was going to allow a 3rd party library to manage my state again. In my case I felt my project definitely warranted a more robust state system. We rather should settle upon a pragmatic middle ground, a place where we take the time to consider whether the addition of Redux to a project would bring value. It would be equally irresponsible to declare that there is no place for Redux. Encouragingly the community is breaking free of this thinking, however, we should take care not to swing the pendulum to the other end. There used to be a dogmatic belief that Redux was a requirement for any “respectable” application. An interesting place to find oneself given the recent push back against it by the community (myself included).
would be the better choice.Īnother outcome was that I had inadvertently reignited my appreciation of Redux and its mature ecosystem.
There still exists complex application state structures in which Redux et al. The result of my exercise was a conclusion that Hooks are awesome, but they can only take you so far. Bugs were creeping in and I was finding it notably difficult to identify and resolve them - my debugging tool had been reduced (har har) from the fabulous Redux Dev Tools Extension to the notably simpler console.log. I tried to push on with the migration, but the complexity of my global state continued to grow and eventually I hit a critical point where I was absolutely dying for more a robust and encompassed state solution. These problems required home-baked solutions or 3rd party libraries - diluting the experience for me.
async flow and derived state) began to appear. As time progressed the more complex components of state management (e.g. These are powerful primitives, and one could be forgiven for convincing themselves they would never need a 3rd party state library again.
Some of the built in React Hooks include useReducer, and useContext. One of the immediate considerations was that of global state. With these new tools at our disposal I decided to reevaluate the libraries and patterns that I reach for to see if I could replace them with native implementations. The recent announcement of Hooks has blown away complexity and completely reinvigorated my love with React. This post assumes some basic knowledge with the new React Hooks feature.