React foundations
What React is, components and rendering, the rules of JSX, and passing data with props and children.
About 4 hours of study
Learning objectives
- Write and compose function components
- Use JSX expressions and attributes
- Pass data with props and children
Lessons
- 1
What React is: components and rendering Intermediate
What React does, how a page is built from components that are plain functions, how the App component is rendered into the page, and how React keeps the page in step with your data.
- 2
JSX: HTML inside JavaScript Intermediate
The rules of JSX: one root element or a fragment, JavaScript expressions in braces, className and other camelCase attributes, style objects, closing every tag, and how JSX becomes function calls.
- 3
Props: passing data to components Intermediate
How components receive data through props, destructuring props with default values, the special children prop, and why props are read-only.
Module practice
- React: Your first componentEasy
- React: A page from three componentsMedium
- React: A layout with nested componentsHard
- React: Show an object with JSXEasy
- React: Style objects from dataMedium
- React: Turn HTML into JSXHard
- React: Greetings with propsEasy
- React: A product card with a default propMedium
- React: A panel that wraps its childrenHard