React · Junior · Question 6 of 75
Why doesn't the component function card() { ... } work as <card />?
- 1Components must be declared only with arrow functions, not
function - ✓Correct answer: JSX treats lowercase names as HTML tags
- 3A component must have
export default, otherwise JSX won't find it
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.