Tech Challenge
2026-11-18
⚛️
Daily Tech Challenge
React
medium
Question 1 of 5
This controlled input cancels the paste event. The user copies the word 'hello' elsewhere, focuses the empty input, and presses Ctrl+V once. What happens?
Example
function NoteInput() {
const [text, setText] = useState('');
return (
<input
value={text}
onChange={e => setText(e.target.value)}
onPaste={e => e.preventDefault()}
/>
);
}Wednesday, November 18, 2026 · A new challenge drops every day