From a4e87f03a95d651fe34b133539335cc41c596c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Xalambr=C3=AD?= Date: Thu, 12 Jan 2023 01:55:20 -0500 Subject: [PATCH] Deprecate `useRouteData` (#148) --- src/react/use-route-data.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/react/use-route-data.tsx b/src/react/use-route-data.tsx index 4e0b7a63..79080a81 100644 --- a/src/react/use-route-data.tsx +++ b/src/react/use-route-data.tsx @@ -1,5 +1,8 @@ import { useMatches } from "@remix-run/react"; +/** + * @deprecated Use the `useRouteLoaderData` hook from `@remix-run/react`. + */ export function useRouteData(routeId: string): Data | undefined { return useMatches().find((match) => match.id === routeId)?.data as | Data