My rule for React state: Any state that can be derived, should be derived
My rule for React state:
Any state that can be derived, should be derived.
This seems obvious with a simple example like this. But it's a surprisingly common mistake.

Shameless plug: I explore many other handy React state management patterns in "Managing React State" on Pluralsight: https://app.pluralsight.com/profile/author/cory-house
#react