Good article, thanks.
Einar Paul Qvale
21

You are totally correct about the re-render of the components. And your explanation is sufficient I think.

The other gotcha with the same impact I saw on two projects was reducers always returning a different state. Stuff like:

return {…state};

return { element: reducer(state, action), element2: reducer2(state, action) };

etc. It would be worth making a lib you can activate in development to detect those errors!

A single golf clap? Or a long standing ovation?

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