React course slides and runnable workshop code.
This repository now has one root Vite React TypeScript app that can run demos and exercises from every day folder.
npm installnpm run courseThe default launcher lives at /, for example http://localhost:5173/ during local development.
npm run course -- day-1/demo/vite-basics
npm run course -- day-1/exercises/build-product-card/starter
npm run course -- day-1/exercises/build-product-card/solution
npm run course -- day-2/exercises/fetch-and-render-a-list/solutionPresentations stay under presentation/, but runnable targets now live in root-level demo/ and exercises/ folders:
demo/
day-x/
some-demo-title/
entry.tsx
exercises/
day-x/
some-exercise-title/
starter/
entry.tsx
solution/
entry.tsx
presentation/
Day X/
index.html
The launcher groups content by day and shows:
- a presentation link when that day already has
index.html - a demos section with direct links to each demo target
- an exercises section with direct links to starter and solution targets
Every runnable target exports:
meta: identifies the day, title, kind, variant, and launcher iddefault: the React component rendered by the root course app
Example:
import type { CourseTargetMeta } from '../../../src/course.ts'
export const meta: CourseTargetMeta = {
id: 'day-1/demo/example',
title: 'Example',
dayOrder: 1,
dayLabel: 'Day 1',
kind: 'demo',
variant: 'demo',
order: 1,
}
export default function Example() {
return <div>Demo content</div>
}day-1/demo/product-counterday-1/exercises/build-product-card/starterday-1/exercises/build-product-card/solutionday-1/exercises/build-product-card-with-prop/starterday-1/exercises/build-product-card-with-prop/solutionday-1/exercises/podcast-episode-cards/starterday-1/exercises/podcast-episode-cards/solution
day-2/exercises/fetch-and-render-a-list/starterday-2/exercises/fetch-and-render-a-list/solutionday-2/exercises/starwars-characters/starterday-2/exercises/starwars-characters/solutionday-2/exercises/task-list/starterday-2/exercises/task-list/solution
day-3/exercises/podcast-navigator/starterday-3/exercises/podcast-navigator/solutionday-3-part-2/exercises/zustand-counter/starterday-3-part-2/exercises/zustand-counter/solution
day-4/demo/react-memoday-4/demo/use-memoday-4/demo/use-callbackday-4/exercises/filtered-analytics-summary/starterday-4/exercises/filtered-analytics-summary/solutionday-4/exercises/stable-product-rows/starterday-4/exercises/stable-product-rows/solution
npm run build