Le Quotidien Shaarli

Tous les liens d'un jour sur une page.

June 13, 2022

Why Use useReducer? | Kyle Shevlin
thumbnail
In general, I treat useState as the default tool for the state management job. In many situations, I have a single state to manage and writing a few declarative state updaters for that state does the trick. That said, there are certain conditions that make useReducer a better choice.