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

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

Awesome Lists containing this project

README

        

# peppermint-router

Lightweight hash router for React

[![package size](https://img.shields.io/bundlephobia/minzip/peppermint-router?label=minified%20gzipped)](https://bundlephobia.com/result?p=peppermint-router)
[![npm version](https://img.shields.io/npm/v/peppermint-router.svg?label=version)](https://www.npmjs.com/package/peppermint-router)
[![license](https://img.shields.io/npm/l/peppermint-router.svg)](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).