3 ms·
I've seen a _lot_ of folks put multiple separate `setState` calls in a row, one for each field they want to update. I make sure to point out that it's nicer to
by acemarke 7y ago
I've seen a _lot_ of folks put multiple separate `setState` calls in a row, one for each field they want to update. I make sure to point out that it's nicer to read if they're collapsed into a single call, but it's a very common thing.
- gatherhunterer 7y agoA scrum master or maintainer needs to proofread and prevent this. That is is the purpose of code review. It’s too bad that repetition does not stand out as a mistake to so many with whom you have worked.
- acemarke 7y agoThat's literally my point. Folks learning React will do that at first, because they don't know better. We _have_ caught that in code reviews, taught them not to do that, and moved on. But yes, it is an actual thing I have seen people (coworkers and otherwise) do, not some made-up problem.