React · Junior · Question 6 of 75

Why doesn't the component function card() { ... } work as <card />?

Explanation

JSX distinguishes tags by case: <card /> becomes a DOM element card, while <Card /> becomes a call to your component. The declaration form (function or arrow) and the export style don't matter.

Further reading

Problem with a question

React · Junior · question 6

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz