Chapter 6 · Example 2 · Deep dive into diffing and reconciliation

Components defined inside components

Declaring a component inside another recreates its function on every render, so React remounts it each keystroke and its active state is lost.

Loading live editor…