5 ms·
I also liked/like the idea of one state object. With hooks now they really discourage packing everything into one state object and you either have to use a bunc
by adamddev1 5y ago
I also liked/like the idea of one state object. With hooks now they really discourage packing everything into one state object and you either have to use a bunch of different `useState` statements for your different variables or pack a big state object in one `useState` but then you face big performance issues with needless re-renders when you only change one element of the state object.
- andsbf 5y agoTake a look at useReducer(no 3rd package, part of the React api)