News for hackers. Stuff that matters.
Re:Use-state-methods: all the power of useReducer without th... by pelotom on Tuesday March 26, 2019 @04:02PM (#19495491)
`useReducer` is the most powerful core building block for state management in React 16.8, but its API is more complicated than it needs to be. `use-state-methods` offers a simpler alternative with no loss of expressiveness. Think in terms of "methods" which either mutate state or return a new state. No dispatching actions, no giant switch statements to handle them, and with free callback memoization.

There are no comments on this comment yet.