Live data from Hacker News

Use-state-methods: all the power of useReducer without the ceremony of actions

github.com

1–2 of 2 posts

Re: Use-state-methods: all the power of useReducer without the ceremony of actions

#2
`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.