Skip to main content

React Guide

About this guide

This is a 30-chapter guide that teaches modern React development (Vite + TypeScript + Tailwind CSS) systematically from the ground up. You can learn in a continuous flow, from the JavaScript prerequisites all the way to a full-stack implementation.

Features of this guide
  • Step by step: Starting from the JavaScript ES6+ prerequisites, you learn in this order: JSX → components → Hooks → state management → advanced topics → full stack
  • Tech stack: Vite + TypeScript + Tailwind CSS + Zustand + TanStack Query + React Router
  • Code-focused: Each chapter offers plenty of implementation examples and explanations of "why you do it this way"
  • Exercises and notes: Collapsible <details> blocks provide detailed explanations and supplementary information

Structure of the guide

How the learning path is organized

The guide is organized into eight groups, progressing from the basics to real-world practice.

Foundations — Prerequisites and environment (Ch. 1-3)

#ChapterOverview
01About this bookWhat this guide aims for and how to work through it
02JavaScript basics (ES6+)The ES6+ features you will meet constantly in React
03Setting up the development environmentBuilding a Vite + React + TypeScript setup

React basics — Core elements (Ch. 4-11)

#ChapterOverview
04The basics of JSXThe JSX syntax used to describe UI
05ComponentsReact's basic unit and how to split it up
06PropsPassing data into a component
07State (useState)Managing the state a component holds
08Event handlingHandling clicks, input, and other events
09Conditional rendering and listsRendering by condition and expanding array data
10FormsHandling input values and controlled components
11Schema validation with ZodType inference, React Hook Form, runtime checks on API responses

Hooks in depth — Designing function components (Ch. 12-16)

#ChapterOverview
12useEffectHandling side effects and cleanup
13useRef and DOM manipulationDirect DOM access and holding values
14useContextSharing data across the component tree
15useReducerConsolidating complex state logic
16Custom hooksExtracting logic into a reusable form

UI and styling — Designing the look (Ch. 17-19)

#ChapterOverview
17Styling overviewThe characteristics of each approach and when to use it
18Tailwind CSS (React integration patterns)Variant design, clsx / tailwind-merge, shadcn/ui
19Portals and ModalsImplementing modals with createPortal

State management and data fetching — Preparing to scale up (Ch. 20-22)

#ChapterOverview
20State management (Zustand)Lightweight global state management
21Data fetching (TanStack Query)Caching and syncing server state
22Routing (React Router)Designing page transitions in an SPA

Advanced topics — Knowledge useful in practice (Ch. 23-26)

#ChapterOverview
23Performance optimizationSuppressing re-renders and measuring them
24DebuggingIsolating causes with React Developer Tools
25Class componentsReading existing code and Error Boundary
26Introduction to Next.jsWhere the full-stack framework fits in

Capstone exercise — An implementation project (Ch. 27)

#ChapterOverview
27Practical projectBuilding a task management app with what you learned

Full-stack development — Frontend + backend integration (Ch. 28-30)

#ChapterOverview
28Designing SPA authenticationHolding tokens and protecting routes
29Building a backend with NestJS and PrismaAn API and data layer for the SPA
30Full-stack practical projectA Trello-like app with React + NestJS + Prisma

How to read this guide

  • Beginners: Read from the top in order, running the code in each chapter as you go
  • Experienced readers: It is fine to skim from the Hooks in depth or state management groups
  • Want to dig into a specific topic: Open the relevant chapter directly from the table above
  • Just want the patterns you use at work: Tailwind / state management + data fetching / performance + debugging are the core ones

How the learning guides fit together

This guide focuses on learning the React framework. The underlying syntax is covered by the JavaScript Guide and the TypeScript Guide, and UI styling by the sister guide, the Tailwind CSS Guide. For which guide covers which stage across the whole site, see the Introduction.


Now, let's start with the Introduction.