preact-router-alternate

0.0.7 • Public • Published

Preact Router Alternate

Alternative router for Preact apps. Uses a similar API to React Router, but with some minor changes which I think make more sense.

Getting Started

npm install preact-router-alternate

Features

  • HTML5 History only.
  • Nested routes.
  • Router, Switch, Route, Redirect, Link, Prompt components which are very similar to React Router.
  • Prompt allows you by default to provide a custom component instead of showing alert box.
  • TransitionSwitch component for animating between routes.

Examples

Example app in the examples directory demonstrates different things you can do with this library.

To run the examples:

cd examples
npm install
npm start

Then go to http://localhost:9001 in your browser.

API

See API documentation for further information.

Readme

Keywords

none

Package Sidebar

Install

npm i preact-router-alternate

Weekly Downloads

6

Version

0.0.7

License

MIT

Unpacked Size

18 kB

Total Files

5

Last publish

Collaborators

  • pepsryuu