You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is your are passing inline function on customInput, customInput accepts a Component reference (note it's not a render prop), here you are passing new component reference every time it rerenders. This makes it umount and remount CustomInput every time it renders loosing focus and state.
Describe the issue and the actual behavior
When entering text in the field, the field immediately clears, and loses focus - suspecting rerender. I am using function based components
Describe the expected behavior
Not lose focus, and update accordingly
Provide a CodeSandbox link illustrating the issue
https://codesandbox.io/s/crimson-https-zqvd27?file=/src/App.js
Provide steps to reproduce this issue
type in box, observe
Please check the browsers where the issue is seen
The text was updated successfully, but these errors were encountered: