Problem Statement
Explain how refs work in uncontrolled components.
Explanation
Refs let you directly access a DOM element. In uncontrolled components, you use refs to read form values without React managing the input state.
Code Solution
SolutionRead Only
const inputRef = useRef();
const handleSubmit = () => {
alert(inputRef.current.value);
};