React Router (ES3)

raw JSON →
2.6.1-rc0 verified Fri May 01 auth: no javascript

A complete routing library for React that keeps your UI in sync with the URL. Version 2.6.1-rc0 (JS-only release, no TypeScript types). Provides simple API with features like lazy code loading, dynamic route matching, and location transition handling. This package is an ES3-compatible fork of react-router v2, targeting older environments (e.g., IE8). Always use the official react-router package for modern development.

error Cannot find module 'react-router-es3'
cause Package not installed or module name misspelled.
fix
Run 'npm install react-router-es3' and ensure import path is correct.
error 'React' is not defined
cause Missing React import.
fix
Add 'import React from 'react';' at the top of your file.
error TypeError: Cannot read property 'path' of undefined
cause Route component not rendered correctly; missing parent Route.
fix
Ensure all routes are children of a Router component with proper nesting.
breaking This is an ES3-compatible fork of react-router v2. It is not the official react-router package.
fix Use the official react-router package for modern development (v3+).
gotcha No TypeScript type definitions. Importing from 'react-router-es3' will cause TS errors.
fix Install @types/react-router for v2 types, but they may not match perfectly.
breaking Version 2.6.1-rc0 is a release candidate; API may change before stable.
fix Use a stable version if available.
npm install react-router-es3
yarn add react-router-es3
pnpm add react-router-es3

Basic setup with two routes using browserHistory.

import React from 'react';
import { render } from 'react-dom';
import { Router, Route, Link, browserHistory } from 'react-router-es3';

const Home = () => <h1>Home</h1>;
const About = () => <h1>About</h1>;

render(
  <Router history={browserHistory}>
    <Route path="/" component={Home} />
    <Route path="/about" component={About} />
  </Router>,
  document.getElementById('root')
);