React

The pick for job-seekers, interactive apps and larger teams.

React is the frontend library you'll meet most often in job listings, tutorials and existing codebases. Stack Picker recommends it when that reach matters more than a gentle first week - and when your project has enough moving parts to justify a component-based UI library.


Who gets this pick

You'll see React when any one of these is true: your main goal is getting a developer job, you're building a web app with lots of interaction, or you're working in a larger team. The one exception is a total beginner building a simple portfolio or content site - they get plain HTML, CSS and JavaScript first, whatever their goal.


Why React wins in these situations

For job-seekers, it's arithmetic: React appears in more frontend job descriptions than any alternative, and many "Vue" or "Angular" roles still value React experience because the underlying ideas - components, props, one-way data flow - transfer directly.

For interactive apps, React's model of describing what the UI should look like for a given state, and letting React work out the DOM updates, keeps complex interfaces predictable. Dashboards, editors, carts and feeds are exactly what it was built for.

For larger teams, the size of the ecosystem is the point: every problem you'll hit - forms, routing, data fetching, testing, accessibility - has well-trodden, documented solutions, first-class TypeScript support, and a deep hiring pool.


Getting set up in 2026

Create React App, the old default starter, is deprecated - ignore tutorials that use it. For learning and for single-page apps, start with Vite:

npm create vite@latest my-app -- --template react
cd my-app
npm install
npm run dev

The official React docs also point to full frameworks such as Next.js and React Router's framework mode for production apps that need server rendering. They're worth learning later; for your first projects, Vite keeps the moving parts to a minimum.


A first project: an expense tracker

  1. Static components. Build ExpenseForm, ExpenseList and Summary components with hard-coded data. Get used to props and composition.
  2. State. Move the expenses into useState in the parent and pass an onAdd function down to the form. This is the core React pattern: state lives up, events flow up, data flows down.
  3. Derived values. Calculate totals and per-category sums during render instead of storing them in state. If a value can be computed from existing state, it isn't state.
  4. Persistence. Save expenses to localStorage in a useEffect, and read them back as the initial state.
  5. A second page. Add React Router with a monthly report view - your first taste of client-side routing.

Hosting and cost

A Vite build produces static files, so you can host it for free on Netlify, Cloudflare Pages or GitHub Pages, or upload it to shared hosting. Our React deployment guide walks through each, including the one-file fix for "404 when I refresh the page". If you later move to Next.js with server rendering, you'll need a host that runs Node, such as Vercel or Render.


Mistakes to avoid

  • Learning React before JavaScript. Most "React is confusing" moments are really array methods, destructuring, closures or promises. Be comfortable with map, filter and async/await first.
  • Mutating state. expenses.push(item) won't trigger a re-render. Create a new array: setExpenses([...expenses, item]).
  • Using useEffect for everything. Effects are for syncing with things outside React (storage, network, timers). Computing a filtered list in an effect is a common source of bugs and extra renders.
  • Array index as a key for lists that can be reordered or filtered. Use a stable id.
  • Reaching for a state library on day one. useState, lifting state up and context cover most small apps. Add Redux, Zustand or similar when you feel real pain.

If you're aiming for a job

Two or three finished, deployed projects with clear READMEs beat ten half-finished tutorials. Once the basics are solid, add TypeScript, write a few component tests with Vitest and Testing Library, and build one project that fetches from a real API with loading and error states - that's what day-to-day React work looks like.


Take the quiz All picks