/router

React router with history API, React Hooks and Context

Primary LanguageJavaScriptMIT LicenseMIT

Router

Simple React router without external dependencies.

Motivation

There are too many routing libraries with countless dependencies. This router project is an example of how to do the routing with pure React using Hooks and Context.

Features

  • Access to path params and query params
  • Routing from within the app
  • Active class on Link components
  • Fallback case for wildcard/404 page
  • Redirects

Example

Example usage can be found in App.js

License

Licensed under the MIT License.