⚛️4 questions I ask before using useState: 1


⚛️4 questions I ask before using useState:

1. Should I store this state in the URL?

2. Can I derive the value from other state?

3. Is this state related to existing state? (If so, I add a property to the existing useState call)

4. Is useReducer preferable for this use case?

View original on X