When the "key" prop of a component changes between render passes, React is expected to unmount the previous instance and mount a new one during reconciliation. However, when said component is the root (i.e. whose DOM parent is the mount point) the same component instance is used.
This JSFiddle demonstrates how a stateful component with a changing "key" is not unmounted when it is the root: http://jsfiddle.net/Yd25R/1/
When the "key" prop of a component changes between render passes, React is expected to unmount the previous instance and mount a new one during reconciliation. However, when said component is the root (i.e. whose DOM parent is the mount point) the same component instance is used.
This JSFiddle demonstrates how a stateful component with a changing "key" is not unmounted when it is the root: http://jsfiddle.net/Yd25R/1/