Klisiu
Klisiu

Reputation: 9

Component inside another doesn't working - React

Code in Atom - lookin nice :D

This code won't working and I have no idea why ;/ In app it's making empty markup and under text "zehy". I'm new in ReactJs and it's very frustrating ...

Upvotes: 0

Views: 429

Answers (2)

MEnf
MEnf

Reputation: 1512

Components need to be PascalCase in order to work. In JSX, lower case names aren't treated as html tags. Change <taskItem /> to <TaskItem />

Upvotes: 1

Dimitar Christoff
Dimitar Christoff

Reputation: 26165

React components need to be upper-cased first letter (capitalised).

See https://reactjs.org/docs/jsx-in-depth.html#html-tags-vs.-react-components

Upvotes: 1

Related Questions