definetly type "handle" in a Route component (typescript) #10180
Unanswered
frankybboy96
asked this question in
Q&A
Replies: 1 comment 3 replies
-
I'm trying to do the same thing (make sure I don't have a typo in my
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm creating a breadcrumb using the useMatches hook, similar to the example in the documentation and I have 2 different kinds of crumbs that i'm using in my app. i'm looking for a way to change the typing of the "handle" props to extend my own crumb type on it.
type NamedCrumb = { name: string };
type DynamicCrumb = { parameterName: string };
type CrumbType = NamedCrumb | DynamicCrumb;
I'd want the handle props to specify the presence of an optional crumb parameter typed CrumbType
Beta Was this translation helpful? Give feedback.
All reactions