I have a component like this:
const MyInput = ({ defaultValue, id, onChange }) => { const [value, setValue] = useState(defaultValue); const handleChange =