title: Why are all the PureComponent children of a container updating when only one child's state is modified in the container's state tree?
body: <p>Learning React and Redux. I'm playing with the Redux examples, and currently looking at the <a href="https://github.com/reduxjs/redux/tree/ecb1bb453a60408543f5760bba0aa4c767650ba2/examples/todos-with-undo" rel="nofollow noreferrer">todo-with-undo</a> example (don't think its possible to set up a sandbox or something). In this setup there is a container component (TodoList) and it's children (Todo).</p>
  <p>I modified the Todo from a functional component to PureComponent class so that shouldComponentUpdate() returns false if all the prop references are the same, and thus the components shouldn't update (but they will still re-render???).</p>
  <p>Adding code to log when a child updates with componentDidUpdate() method and also to log when re-rendering shows that every time a new Todo is added to the container, <strong>all elements update and rerender</strong> - even whilst being PureComponents - it should be the case that shallow comparisons of old and new props for each child should return false for the new or updated child.</p>
  <p>Being an example built by Redux I doubt that they update the store incorrectly (not in an immutable fashion), as that is the point of their concept, so I believe I am not fully understanding something -&gt; someone please help...</p>