UNPKG

@designerstrust/remix-utils

Version:

This package contains simple utility functions to use with [Remix.run](https://remix.run).

6 lines (5 loc) 216 B
import { useMatches } from "@remix-run/react"; export function useRouteData(routeId) { var _a; return (_a = useMatches().find((match) => match.id === routeId)) === null || _a === void 0 ? void 0 : _a.data; }