In standard HTML, a <textarea> stores its content between the opening and closing tags. In React, it is usually treated as a controlled input with a value prop and an onChange handler.
That gives you one consistent way to manage text fields, whether you are working with a single-line input or a larger multi-line editor.
import { useState } from 'react';function EssayForm() { const [text, setText] = useState("Write your essay here."); return <textarea value={text} onChange={(e) => setText(e.target.value)} />; }
children instead of value in React.onChange handler on a controlled textarea.undefined when you want a visible default value.If the field starts empty, use an empty string instead of null or undefined. That keeps the textarea controlled from the beginning and avoids React warnings.