https://github.com/alonrbar/peppermint-router
Lightweight hash router for React
https://github.com/alonrbar/peppermint-router
Last synced: about 1 month ago
JSON representation
Lightweight hash router for React
- Host: GitHub
- URL: https://github.com/alonrbar/peppermint-router
- Owner: alonrbar
- License: mit
- Created: 2019-07-25T07:12:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T20:45:04.000Z (10 months ago)
- Last Synced: 2025-05-10T06:39:36.816Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 186 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# peppermint-router
Lightweight hash router for React
[](https://bundlephobia.com/result?p=peppermint-router)
[](https://www.npmjs.com/package/peppermint-router)
[](https://www.npmjs.com/package/peppermint-router)## The gist
```jsx
```
## Prompt navigation
```jsx
{({ isNavigating, confirm, cancel }) => (
isNavigating && (
Move to another page?
Confirm
Cancel
)
)}```
## Why?
- Extremely compact - less than 2kb gzipped!
- Does not require special `` tags and other boilerplate.
- `` component with custom prompt out of the box.## Why not?
- Only hash routes
- No SSR support
- No React Native support## Changelog
The change log can be found [here](https://github.com/alonrbar/peppermint-router/blob/master/CHANGELOG.md).