About

What React Router is

React Router helps you organise your applications based on (nested) URLs.

This offers many advantages:

  • Explicit views declarations: instantly understand what are your app views
  • Restore any view + state with a simple URL (deep-linking)
  • Nested views: react-router handle nested views and their progressive resolution
  • History: User can navigate backward/forward and restore state
  • Views transitions: automatic CSS transitions when navigating
  • Standardized app structure and behaviour, useful when working in a team

By organising your code in such a standard way, it helps you keep a sane codebase, where your views are truly independant from the context.

You can find a few useful react-router example apps on the official react-router repo.

What React Router isn't

React router doesnt handle data-fetching, you have to use async-props or other classical React data fetching mechanism.

Alternatives