@orballo/very-tiny-router

0.1.2 • Public • Published

Very Tiny Router

A very tiny router (source agnostic) for Frontity.

Router action

const Button = () => {
  const { actions } = useConnect();

  const handleClick = () => {
    actions.router.set("/");
  };

  return <button onClick={handleClick}>Go Home</button>;
};

Link component

import Link from "@orballo/very-tiny-router/link";

const Component = () => {
  return <Link link="/">Go Home</Link>;
};

Package Sidebar

Install

npm i @orballo/very-tiny-router

Weekly Downloads

2

Version

0.1.2

License

Apache-2.0

Unpacked Size

5.57 kB

Total Files

5

Last publish

Collaborators

  • orballo