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
Expo snack don't let me import respository also there are no terminal at all (I wanted to create clear next app to create minimal reproduce example but since I didn't found it I decided to import repository)
It should work like so:
when I press esc it discard changes I made
when I press enter it apply changes I made
Now to discard changes I use event listener on esc press and it doesn't work (I mean I ref is null - check console log to make sure that is null - so I that's the isse - without ref its no way to realize functionality I described above)
Codesandbox/Expo snack
https://github.com/nicitaacom/acc2-react_hook_form_with_useref
Version Number
7.47.0
Steps to reproduce and reproduce example
I tried do it with codesandbox but got 2 errors
It even don't let me type in terminal
Expo snack don't let me import respository also there are no terminal at all (I wanted to create clear next app to create minimal reproduce example but since I didn't found it I decided to import repository)
Minimal reproduce example
please check it out - https://github.com/nicitaacom/acc2-react_hook_form_with_useref
git clone https://github.com/nicitaacom/acc2-react_hook_form_with_useref
pnpm i
pnpm dev
when I press esc it discard changes I made
when I press enter it apply changes I made
Now to discard changes I use event listener on esc press and it doesn't work (I mean I ref is null - check console log to make sure that is null - so I that's the isse - without ref its no way to realize functionality I described above)
Expected behaviour
https://www.react-hook-form.com/faqs/#Howtosharerefusage
This example lies and
firstNameRef
returnsnull
if you console.log itIt makes impossibe to use ref to add event listener to ref (or set focus state)
What browsers are you seeing the problem on?
Chrome
Relevant log output
'inputRef.current - ' null
The text was updated successfully, but these errors were encountered: