Build React components: 10 levels of props, state, effects and conditional rendering. The most effective React fundamentals game around.
Welcome, Component Maker. You'll learn React, a library for building UI. Each level shows React code and you have to predict its behavior.
Props (properties) are how a parent sends data to a child component. Props are read-only: the child can't change them.
useState stores data that can change (state). When the state changes via the setter, the component re-renders with the new value.
useEffect runs side effects (fetching data, subscribing, etc.). The dependency array controls WHEN it runs: [] = once, [dep] = when dep changes, no array = every render.
React always re-renders all children when the parent re-renders. This is by design: React prefers to re-render and rely on virtual DOM diffing for performance. React.memo() can skip a re-render if the props didn't change.
Greeting that takes a name prop and renders <p>Halo {name}</p>.Counter component with an arrow function and useState so the button increments the count.And more, 19 levels in all.