Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/robbdimitrov/router

React router with history API, React Hooks and Context
https://github.com/robbdimitrov/router

javascript react react-hooks react-router router

Last synced: 2 days ago
JSON representation

React router with history API, React Hooks and Context

Awesome Lists containing this project

README

        

# Router

Simple [React](https://github.com/facebook/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](https://reactjs.org/docs/hooks-intro.html)
and [Context](https://reactjs.org/docs/context.html).

## Features

- Access to path params and query params
- Routing from within the app
- `Active` class on [Link](./src/router/Link.js) components
- Fallback case for wildcard/404 page
- Redirects

## Example

Example usage can be found in [App.js](./src/App.js)

## License

Licensed under the [MIT](LICENSE) License.