Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/robbdimitrov/router
- Owner: robbdimitrov
- License: mit
- Created: 2020-05-23T16:47:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-28T15:40:47.000Z (over 2 years ago)
- Last Synced: 2024-11-10T15:06:57.140Z (about 1 month ago)
- Topics: javascript, react, react-hooks, react-router, router
- Language: JavaScript
- Homepage:
- Size: 1.38 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.