Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 442 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 442 Bytes

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>;
};