Components & React Thinking
Intermediate · 13 missions · about 4 hours
Every modern web app is built from components, and AI writes them by the thousand. Learn to think the way React does: props, state, effects, context and reducers, then build, review and fix real component code until you can ship a working app.
Missions
- Your first components: Build a page from small functions that return UI.
- Props: components with inputs: Pass data into components and reuse them everywhere.
- State & events with useState: Make components remember things and react to clicks.
- Lists, keys & conditional rendering: Render data, show the right state, keep items straight.
- Controlled forms: Inputs driven by state: validation, disabled buttons, clean data.
- Lifting state up: Share state between siblings: data down, events up.
- Effects & data fetching: Load data with useEffect: loading, errors and race conditions.
- Custom hooks: reuse logic: Package stateful logic into your own use… functions.
- Context: skip the prop drilling: Share a theme or the current user with any component, at any depth.
- useReducer for complex state: Move every state change into one pure, testable reducer.
- Prompting AI for components: Spec a component so the AI gets props, states and accessibility right.
- Fix the AI: stale state & missing dependencies: A frozen timer, a +2 that adds 1, and a search that never updates.
- Boss: Ship a kanban board: Reducer, filters, counts and lists: a real app in one component tree.
Part of: AI Web Developer career path