My custom react component doesn't work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

My custom react component doesn't work

Why it doesn't work? It has to

26th Jul 2022, 1:23 PM
Javascript Developer
Javascript Developer - avatar
6 Answers
+ 2
Always use first letter capital for the React Components Line 12 - function Header(){ Line 19 - <Header />
26th Jul 2022, 1:51 PM
zexu knub
zexu knub - avatar
26th Jul 2022, 1:43 PM
Javascript Developer
Javascript Developer - avatar
+ 1
zexu knub thanks it worked😍 Why if we dont use capital it doesn't work?
26th Jul 2022, 1:59 PM
Javascript Developer
Javascript Developer - avatar
+ 1
Zeynab Cool, I don't know for sure but i guess it's because lowercase component conflicts with the predefined HTML tags
26th Jul 2022, 2:04 PM
zexu knub
zexu knub - avatar
0
Please do not put links in the tag section – we cannot click it. Rather put the relevant programming language in the tag section.
26th Jul 2022, 1:25 PM
Lisa
Lisa - avatar
0
zexu knub this makes sense.
26th Jul 2022, 2:12 PM
Javascript Developer
Javascript Developer - avatar