+ 1
Styled components
Why input loose focus when i use onChange with styled components in react
1 Resposta
0
This happens because you've defined Input within the render() method. Every time the state gets updated, the render() method will be called and Input will be redefined and handled as if it was a completely new component (a html <input/> without focus in this case).
https://stackoverflow.com/questions/57096907/styled-component-input-loses-focus-onchange
https://pretagteam.com/question/styled-component-input-loses-focus-onchange