React setState async mistake
Arnar Kári Ágústsson

Why would you ever do that in the first place? Spreading state and then setting it again makes no sense.

As for the code example, it smells. You should assign value to a variable and at the end of the function call one setState.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.