Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account

    When to useState instead of useReducer


    useReducer is definitely more powerful than useState (you can even implement useState using useReducer), but there's one scenario where useState is almost certainly better than useReducer:

    When it's just an independent element of state you're managing: useState

    This is based on my blog post: Should I useState or useReducer?

    And don't miss When to useReducer instead of useState