Replies: 1 comment 1 reply
-
Just typecast it with const data = useLoaderData() as WeirdDataProps; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
we could declare the return type in the Hook call, with
const data = useLoaderData<WierdDataProps>()
export declare function useLoaderData<T>(): T;
react-router/packages/react-router/lib/hooks.tsx
Line 749 in 892238b
Beta Was this translation helpful? Give feedback.
All reactions