Skip to main content
Module

x/ruck/useNavigate.mjs

Ruck is an open source buildless React web application framework for Deno.
Go to Latest
File
// @ts-check
import { useContext, useDebugValue } from "react";
import NavigateContext from "./NavigateContext.mjs";
/** * A React hook to use the `navigate` function for navigating Ruck app routes. */export default function useNavigate() { const navigate = useContext(NavigateContext); useDebugValue(navigate); return navigate;}