> or example, one of them has 4 setState() calls after each other instead of combining them.
You would still need one line for each state property set:
this.setState({
data: newData,
dimensions: getDimensions(),
xScale: getXScale(),
yScale: getYScale(),
})
(Unless you were to compress all of that into one line...)In fact that makes things longer in terms of LoC. A bit less noisy though, that'd be true.
> Another manually performs deep equality checks for each key instead of using some library/helper.
Yeah well, I think this is completely fair if you want to "compare oranges with oranges". If the author were to include external libraries, then they would no longer be comparing "Reach with hooks" with "classic React", but with "classic React + some X library" instead.