deno.land / x / ruck@v5.0.0 / useRoute.mjs

useRoute.mjs
// @ts-check
import { useContext } from "react";
import RouteContext from "./RouteContext.mjs";
/** A React hook to use the current Ruck app route. */export default function useRoute() { const route = useContext(RouteContext); if (!route) throw TypeError("Context value missing."); return route;}
ruck
Ruck is an open source buildless React web application framework for Deno.
GitHub Stars
74
Go to latest

Version Info

Tagged at
a month ago

External Dependencies