I
I
Ilya Famin2021-03-08 10:32:49
React
Ilya Famin, 2021-03-08 10:32:49

Why is the useState hook not working?

Here is the code of the imported react component: https://trycode.pw/c/2Y4XZ
the bottom line is that everything seems to be correct here, but react gives the following error:
"React Hook "React.useState" is called in function "inputTweet" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter react-hooks/rules-of-hooks" for about three hours I can't understand why he thinks I want to create a hook and not use an existing one

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tigran Abrahamyan, 2021-03-08
@Fama18122000

go to the translator and translate

React component names must start with an uppercase letter

and go change the name of the component toInputTweet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question