Chapter · 4 lessons
React basics
What React is for and how to build a page with it: components, JSX and props, conditions and lists, events and state, arrays and objects in state.
Components
React basics 01Components, JSX and propsWhat React is for, the first component line by line, the rules of JSX, props and components in files.React basics 02Children, conditions and listsA wrapper for someone else’s content (children and slots), how to show something only sometimes and how to render a list – and why the key matters so much.
State
React basics 03Events and state (useState)What state is for, event handlers, useState line by line, controlled fields, what belongs in state and why state is a snapshot.React basics 04Arrays, objects and shared stateArrays and objects in state without mutations, shared state in the parent and how to arrange state so it doesn’t contradict itself.