.map versus For
An expression such as {todos().map((todo) => <li>{todo.title}</li>)} is a single accessor.
An expression such as {todos().map((todo) => <li>{todo.title}</li>)} is a single accessor. Every time todos() changes, all rows are created again, and the old ones are removed, because none of the new nodes is a node that was present before. That is correct but discards DOM state.
For keeps one row (its own root, its own nodes) per item and hands insert the same row nodes each time, so the identity rule applies.