Roadmap › 4. Frontend › Step 49
Re

React (with Hooks, React 19 & Next.js basics)

JSX, components and props, state, events, conditional rendering and lists, hooks in depth, effects and data fetching, forms, context, reducers, refs, performance (memo, useMemo, useCallback, React Compiler), routing, state libraries, React 19 actions and Server Components, testing and Next.js.
What it is & where it is used

React is a JavaScript library for building user interfaces from components, created at Facebook (Meta) by Jordan Walke and open-sourced in 2013. It is the most widely used frontend library.

Core ideas:

  • Declarative UI — describe what the UI should look like for a given state; React updates the DOM.
  • Components — functions returning JSX; compose them like building blocks.
  • One-way data flow — data flows down via props; events flow up via callbacks.
  • State + re-render — when state changes, React re-renders the component and reconciles the result against the previous render, updating only what changed in the DOM.
  • Hooks (2019) — state and side effects in function components.
  • "Learn once, write anywhere" — React DOM (web), React Native (mobile), React Server Components.

React is a library; for routing, data fetching, SSR and bundling you add tools or use a framework such as Next.js or React Router (framework mode, formerly Remix) — the React docs recommend starting new apps with a framework (or Vite for a pure client app). Create React App was deprecated in February 2025.

Versions & history
VersionDateHighlights
0.3May 2013Open-sourced at JSConf US
0.142015react / react-dom split, stateless function components
15Apr 2016Version jump from 0.14; createElement DOM rendering
16Sep 2017Fiber reconciler, fragments, error boundaries, portals; 16.3 new Context API; 16.8 (Feb 2019) Hooks
17Oct 2020No new features — gradual upgrades, new JSX transform (no import React needed)
18Mar 2022Concurrent rendering, createRoot, automatic batching, useTransition, useDeferredValue, useId, streaming SSR with Suspense
19Dec 2024Actions, useActionState, useOptimistic, use(), form action, ref as a prop, Server Components & Server Actions stable, document metadata, resource preloading
19.1 / 19.22025Owner stacks; 19.2 (Oct 2025): <Activity>, useEffectEvent, partial pre-rendering, cacheSignal

Ecosystem milestones: React Compiler 1.0 (Oct 2025 — automatic memoisation), React Native New Architecture default (0.76, 2024), React and React Native moved to the React Foundation under the Linux Foundation (announced Oct 2025). Next.js: 13 (App Router, 2022), 14, 15 (2024, React 19), 16 (2025, Turbopack default).

Lifecycle

Component lifecycle (function components):

  1. Mount — React calls the component function (render) → commits DOM → runs useLayoutEffect → browser paints → runs useEffect callbacks.
  2. Update — triggered by a state change, new props from the parent re-rendering, or a context change → render again → React diffs the new element tree with the old one (reconciliation) → commits minimal DOM changes → runs effect cleanups for changed dependencies, then the new effects.
  3. Unmount — effect cleanups run (unsubscribe, clear timers).

In development Strict Mode mounts components twice (mount → unmount → mount) to reveal missing cleanups.

Class component lifecycle (legacy): constructor → render → componentDidMount | updates: shouldComponentUpdate → render → getSnapshotBeforeUpdate → componentDidUpdate | componentWillUnmount | errors: getDerivedStateFromError, componentDidCatch.

Class methodHook equivalent
componentDidMountuseEffect(() => {...}, [])
componentDidUpdateuseEffect(() => {...}, [deps])
componentWillUnmountcleanup returned from useEffect
shouldComponentUpdateReact.memo
this.state / setStateuseState / useReducer

Render phases: render phase (pure — call components, compute the tree; can be paused/interrupted in concurrent mode) → commit phase (apply DOM mutations, run layout effects, then passive effects).

Tools used to develop
ToolUse
Vite (npm create vite@latest)Fast client-side React setup
Next.js, React Router (framework), Expo (React Native)Frameworks
React Developer Tools (browser extension)Component tree, props/state, profiler
TypeScriptTyped props/state
ESLint + eslint-plugin-react-hooksRules of Hooks, exhaustive deps
React Compiler (babel/SWC plugin)Automatic memoisation
TanStack Query, SWR, RTK QueryServer-state fetching & caching
Redux Toolkit, Zustand, JotaiClient state
React Hook Form + ZodForms and validation
Tailwind CSS, CSS Modules, shadcn/ui, MUI, ChakraStyling and UI kits
Vitest/Jest + React Testing Library, PlaywrightTesting
StorybookComponent development in isolation