Capítulo 100 de 116
<textarea><textarea> follows the same controlled (value/onChange) vs. uncontrolled (defaultValue) split as <input>, but with one HTML divergence: React uses the value/defaultValue prop instead of HTML's native pattern of placing the initial text as the element's children.
<textarea value={notes} onChange={e => setNotes(e.target.value)} /> — same mental model as a controlled <input> (Ch 98), just for multi-line text.<textarea defaultValue={initialNotes} /> — same as <input>'s defaultValue.<textarea>'s initial content via its children (<textarea>initial text</textarea>); React instead expects value/defaultValue as props and does not support setting content via children — an easy mistake when translating existing HTML directly into JSX (Ch 13's HTML→JSX conversion).<input>: passing value without onChange produces a read-only field and a console warning, for the same reasons.<textarea value={notes} onChange={e => setNotes(e.target.value)} />
value/onChange rather than HTML's children-as-initial-content convention.value/defaultValue, never children, to set a <textarea>'s content in JSX — this is a common HTML→JSX conversion trap.<input> exactly.<textarea> without onChange is effectively frozen, same as a controlled <input>.<input>): the identical controlled/uncontrolled pattern.