S
S
Syoma Davydov2021-10-08 10:50:47
JavaScript
Syoma Davydov, 2021-10-08 10:50:47

I will never learn React like this. What is this error?

615ff7d671310555115623.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Okhotnikov, 2021-10-08
@tsepen

You can’t learn React without learning Javascript, I recommend starting with JS, otherwise there are still a lot of surprises waiting for you

R
Roman Dvoryanov, 2021-10-09
@Raxen

In line 3, the compiler did not understand the construction you wrote and assumed that you declared Header as an unassigned constant, and after it an anonymous function, so he assumed that this was not inheritance, but an enumeration of constants and suggested putting a comma after Header, but in your case you did not write the assignment sign (equals) for the Header constant of the anonymous function.
const Header = () => {…}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question