UNPKG

@designerstrust/remix-utils

Version:

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

10 lines (9 loc) 365 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useRouteData = void 0; const react_1 = require("@remix-run/react"); function useRouteData(routeId) { var _a; return (_a = (0, react_1.useMatches)().find((match) => match.id === routeId)) === null || _a === void 0 ? void 0 : _a.data; } exports.useRouteData = useRouteData;