const [ inputValue, setInputValue ] = useState("Value from onchanges"); const handleCancel = () => { setInputValue(""); }; <button type="submit" onClick={handleCancel}>Cancel</button>