Dec 21, 2023
You can't both pass the ref to your useImperativeHandle and to an input (or you can, but only one will populate the ref's current prop). So if you're passing the ref to useImperativeHandle, the ref should be typed to the shape of what you give useImperativeHandle, not HTMLInputElement.