Infer type from loader to use in components/hooks etc #9972
Answered
by
sergiodxa
JasonColeyNZ
asked this question in
Q&A
-
Is there a way to get the type inference from a part of the data returned from the loader? I have a loader returning something like...
Then in a component I am trying to extract the type using something like...
But typescript warns that
So what is the preferred way to get this type using Remix loaders/actions Version 2.12.0? Cheers for any help. |
Beta Was this translation helpful? Give feedback.
Answered by
sergiodxa
Sep 25, 2024
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
SerializeFrom<typeof loader>