Module 1 ยท Components and JSX Lesson 1 of 15
A component is just a function
A React component is a function that returns markup. Its name starts with a capital letter, and it returns JSX โ HTML that looks like JavaScript because it is.
Worked example
function Card() { return <h3>Hello</h3>; } is a complete component. Everything else in React โ state, effects, routing โ is a tool you attach to functions like this one.
Your practice task
Take a static page you already have and split it into four components: header, list, list item and footer. Nothing else changes yet.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
A React component is a function that returns markup. Its name starts with a capital letter, and it returns JSX โ HTML that looks like JavaScript because it is.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task โ do them and the final project brief writes itself.