← Dashboard

web development / react

Learn React for Free: Pick Next.js, React Router or Vite, Then Learn the Core in Order

The first React decision is no longer "which course" but "which starting point." This guide compares Next.js, React Router and a plain Vite setup using the commands and requirements from their own docs, then teaches the fundamentals through a component that was run and tested.

updated Nov 2026·a 13-minute read·checked against React 19.3

React is a JavaScript library for building interfaces from components. The library itself is small. What overwhelms beginners is everything around it: routing, data loading, server rendering, build tools and the opinions of every tutorial author. The official React docs now say plainly that if you are building a new app or website, they recommend starting with a framework. That advice changes how a learner should start.

This page sorts the choices first, because a wrong start costs a week, and then covers the React concepts in the order that makes later ones easier. The version current on react.dev when this was checked is 19.3, released September 2026.

01 · CHOOSING A STARTING POINT

Next.js, React Router or Vite: how to decide

react.dev's page on creating a React app lists three recommended frameworks and a start-from-scratch route. All of the listed frameworks support client-side rendering, single-page apps and static-site generation, so none of them forces you to run a server. The real differences are what each one decides for you.

Starting points, from the official docs
Starting pointCommandRequirementIt decides for youPick it when
Next.js (App Router)npx create-next-app@latestNode.js 20.9 or newerRouting, rendering, bundler. Default setup enables TypeScript, Tailwind CSS, ESLint, App Router and TurbopackYou want a full-stack app, server rendering or a job-market skill
React Router v7npx create-react-router@latestSee its install guideRouting and a Vite-based full-stack setupYou want routing-first structure with fewer defaults
Vite with Reactnpm create vite@latestNode.js 20.19+ or 22.12+Almost nothing: you choose routing and data fetchingYou are learning core React and want the least hidden
Exponpx create-expo-app@latestSee Expo docsNative Android and iOS plus webYou are building a mobile app

react.dev says building from scratch with Vite, Parcel or Rsbuild requires you to choose tools for routing, data fetching and other common patterns. That is the cost and also the benefit for a learner: you see every piece. A good middle path is to learn the fundamentals in a Vite project, then rebuild one small app in Next.js to see what a framework adds.

TIPUse the Vite templates with TypeScript only if you already know JavaScript. The react template gives plain JavaScript and react-ts gives TypeScript. Learning React and TypeScript together doubles the error messages.
WATCHCheck the Node version first. A tool that refuses to start usually wants a newer Node.js than you have. Run node --version before the scaffolding command and compare it to the requirement above.

02 · THE CORE

The fundamentals in the order that works

These five ideas are most of what you need to read any React codebase. Do them in order, because each one uses the one before.

React concepts and the official page for each
OrderConceptYou understand it when you can...
1Components and JSXSplit a screen into components and explain why a component name starts with a capital letter
2PropsPass data into a component and explain why a component should not change its own props
3StateExplain why changing a variable does not update the screen but calling a setter does
4Thinking in ReactBreak a mockup into a component tree and decide where state should live
5EffectsTell whether a piece of logic needs an effect or can run during rendering

The first three are covered by react.dev's Learn section, which starts with the Quick Start. After that, read "Thinking in React" and "Choosing the State Structure" before building anything bigger than a to-do list. Most state bugs in beginner projects are structure problems that those two pages address.

03 · A WORKED EXAMPLE

Derived state: filter a list without a second useState

The most common beginner mistake is storing something in state that could be calculated. Here, the list of visible trails is not state. It is computed from the query on every render, so it can never fall out of sync.

TrailList.jsxReact 19
import { useState } from 'react';

const TRAILS = ['Ridge loop', 'River path', 'Summit spur'];

export default function TrailList() {
  const [query, setQuery] = useState('');

  // derived from state on every render: no second useState needed
  const visible = TRAILS.filter((t) => t.toLowerCase().includes(query.toLowerCase()));

  return (
    <>
      <label>
        Search <input value={query} onChange={(e) => setQuery(e.target.value)} />
      </label>
      <ul>
        {visible.map((t) => (
          <li key={t}>{t}</li>
        ))}
      </ul>
      <p>{visible.length} of {TRAILS.length} shown</p>
    </>
  );
}

This was bundled with esbuild against React 19.3.1 and loaded in Chromium. It starts at "3 of 3 shown". Typing ri leaves Ridge loop and River path with "2 of 3 shown", and typing zzz shows no items and "0 of 3 shown". There were no console errors. The key on each list item is the trail name, which is unique here; use a stable id from your data in a real app instead of the array index.

Try breaking it on purpose. Add a second useState for visible and update it inside onChange. It appears to work, then fails the moment the source list changes, because the two values can drift apart.

04 · EFFECTS

Most of what people write in useEffect does not need to be there

Effects exist to synchronize a component with something outside React, such as a network request or a browser API. They are not for calculating values from props and state, and beginners overuse them. react.dev has a dedicated page called "You Might Not Need an Effect," and reading it early saves a lot of re-render loops. A good test: if you can compute it during rendering, do not use an effect.

05 · FREE RESOURCES

The pages and courses to use

06 · FAQ

Frequently asked questions

Should I learn React with Next.js or Vite?

React's docs recommend starting new apps with a framework such as Next.js or React Router. For learning the core concepts, a plain Vite project hides less. A practical path is to learn the fundamentals with Vite, then rebuild one small app in Next.js.

Do I need to know JavaScript before learning React?

Yes. React is a JavaScript library, so you should be comfortable with functions, array methods like map and filter, destructuring and modules first. Shaky JavaScript is the main reason beginners find React confusing.

Is React free?

Yes. The official docs, tutorial and Learn section at react.dev cost nothing. The Next.js course, the React Router docs and the Vite guide linked on this page are free to read too.

What is the latest version of React?

React 19.3, released in September 2026, was the latest version listed on react.dev when this page was checked. Check the versions page for newer releases.

Is Create React App still the way to start?

The current React docs do not list it. They recommend a framework such as Next.js, React Router or Expo, or a build tool such as Vite, Parcel or Rsbuild if you start from scratch.

Keep going

Compare frameworks and round out your skills.