React
Component-based UI library for building interactive interfaces. React 19 brings server components, the use hook, a compiler that eliminates manual memoization, and form actions for progressive enhancement.
Overview
- What: UI library (not a full framework) - pair with Next.js, Remix, or Vite for routing/SSR
- Install:
npm create vite@latest my-app -- --template react-ts(client) ornpx create-next-app@latest(full-stack) - Key concepts: Components, JSX, hooks, server components, actions
- React 19:
usehook, React Compiler, server/client components,useActionState,useOptimistic
Contents
Concepts
- Component Model - Functions returning JSX, props, composition, server vs client components
- Hooks - Core hooks, the
usehook (React 19), custom hooks, rules - Server Components - RSC architecture, boundaries, bundle impact, framework support
Quickstart
- Setup - Vite + React + TypeScript + Tailwind from scratch
- First App - Build a task list with state, data fetching, and form actions
Deep Dives
- Data Fetching -
use+ Suspense, TanStack Query, server component patterns - State Management - Local, shared, server, and complex state patterns
- React Compiler - Automatic memoization, setup, what you can stop writing
- Forms and Actions - Server actions, useActionState, optimistic updates
Notes
- Gotchas - React 19 breaking changes, boundary mistakes, profiling tips