textbox losing focus in react code example
Example: focus text input losing input react
I had the same symptoms with hooks. Yet my problem was defining a component inside the parent.
Wrong:
const Parent =() => {
const Child = () => <p>Some DOM element</p>
return <Child />
}
Right:
const Parent =() => {
const Child = () => <p>Some DOM element</p>
return Child()
}