DOM events
onInput
Runs when user input changes a control. For controlled text inputs, React onChange is generally the conventional state-update handler. Programmatic assignment to an input value is not a substitute for dispatching an input event.
Formal Syntax & Structure
react syntaxreact
onInput={handler}Working Example
Example Snippetreact
export default function App() { return <label>Tool<input defaultValue='Saw' onInput={e=>console.log(e.currentTarget.value)}/></label>; }