Preact Simple Router
A simple router for preact.
Installation
# npm
npm install --save @marvinh/preact-router
# yarn
yarn add @marvinh/preact-router
Usage
// TODO
import { h } from "preact";
import { Link } from "@marvinh/preact-router";
export default function App() {
return (
<div>
<Link
href="/blog/my-first-post"
class="my-link"
activeClass="my-active-link"
>
My First Blog Post
</Link>
</div>
);
}
License
MIT
, see License file.