From 6d44e50740ceb4cb6a1574d05de8298de7fc3a11 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Mon, 18 Sep 2023 10:09:04 -0400 Subject: [PATCH] Add second generic to UIMatch for handle field --- .changeset/add-uimatch-handle.md | 5 +++++ packages/remix-react/components.tsx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/add-uimatch-handle.md diff --git a/.changeset/add-uimatch-handle.md b/.changeset/add-uimatch-handle.md new file mode 100644 index 00000000000..20cafbdfcd4 --- /dev/null +++ b/.changeset/add-uimatch-handle.md @@ -0,0 +1,5 @@ +--- +"@remix-run/react": patch +--- + +Add second generic to `UIMatch` for `handle` field diff --git a/packages/remix-react/components.tsx b/packages/remix-react/components.tsx index 72b2a2ab610..de97f2f88fa 100644 --- a/packages/remix-react/components.tsx +++ b/packages/remix-react/components.tsx @@ -52,6 +52,7 @@ import type { MetaDescriptor, MetaMatch, MetaMatches, + RouteHandle, } from "./routeModules"; function useDataRouterContext() { @@ -976,7 +977,10 @@ function dedupe(array: any[]) { return [...new Set(array)]; } -export type UIMatch = UIMatchRR>; +export type UIMatch = UIMatchRR< + SerializeFrom, + H +>; /** * Returns the active route matches, useful for accessing loaderData for