Turn an array into a list with map, and give each item a key. Learn why React needs keys, the bug that index keys cause, and how a key can reset a component.
Show a part of the page only when something is true. Learn if, the ternary, && and its 0 bug, null, and why removing a component makes it forget its state.
Make a page respond to clicks, typing and forms. Learn why you pass a function and don’t call it, how events bubble up, and when to use preventDefault.
To change an object or array in state, make a new one. Learn why changing the old one doesn’t update the page, and how to add, remove and change items with spread, filter and map.
State is what a component remembers between renders. Learn how useState works, why state is a snapshot, how to update it many times in one click, and common mistakes.
Props are the values a parent gives to a child component. Learn how to pass them, type them, give them defaults, use children, and why a component must never change its props.
A component is a function you write. An element is the object JSX makes. Learn who calls your component and when, why logs appear twice in development, and three mistakes that come from mixing the two up.
JSX lets you write HTML-like tags inside JavaScript. Learn what JSX turns into, how curly braces work, the three rules of JSX, and common mistakes. Every example runs in the page.