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) or npx create-next-app@latest (full-stack)
  • Key concepts: Components, JSX, hooks, server components, actions
  • React 19: use hook, React Compiler, server/client components, useActionState, useOptimistic

Contents

Concepts

  • Component Model - Functions returning JSX, props, composition, server vs client components
  • Hooks - Core hooks, the use hook (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

Notes

  • Gotchas - React 19 breaking changes, boundary mistakes, profiling tips

Resources