Hacker News new | ask | show | jobs
by squillion 720 days ago
I've encountered all the issue listed in the post. The worst for me is redundant (overdetermined) state, that is, when a state variable is actually derivable from other state variables. It's pointless, confusing, and broadens the space of possible states, including impossible and inconsistent ones.
1 comments

I see this all the time, even with coworkers who have worked with react for years and when I question it they have such a hard time understanding what the issue is with this.

Not using derived state or in other words not using the minimal state required is one of the most common issues I end up seeing, people just add state everywhere not realizing a lot of the time additional state is not needed and every little variable doesn't need to be separate state.

To be fair to React, this is 100% the developers' fault. State must be minimal, by definition.