UseRef Hook don't work

Dear All
Hi
I study the lesson which is related to accessing input fields with useRef hook, when I code as is taught , I didn’t get the access to input field as I attached the code and result(the web page is the result of when I press the submit button)
I will be grateful if anyone could help me

Hello Razieh,

The only thing I can see that might be a problem with your code is that you’re not calling event.preventDefault(). You are simply referencing it. However that does not seem to be the reason for this error message.

When I googled the error message it implies that it has something to do with the installed extensions in Chrome.

See this stackoverflow post for more info:

thanks dear
when I call event.preventDefault the problem gone :slight_smile:

1 Like