Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

preact-router-alternate

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

latest
npmnpm
Version
0.0.7
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 06 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts