Replies: 1 comment
-
This is related to #205. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm unsure if this is something I'm not doing straight.
remix-validated-form
expects aFetcherWithComponents<never>
on theValidatedForm.fetcher
, which is exacly what Remix returns from the normaluseFetcher
hook.When using remix-typedjson to get a better typing for the deserialization that happens on useFetcher (eg.
Date
fields coming from Prisma) we must use theuseTypedFetcher<typeof action>()
hook provided for the package instead, returning aTypedFetcherWithComponents<something>
.I've been working around this with the
as
hack from TypeScript.remix-validated-form
is being too strict on the expected typing and could expect something more broad/generic).remix-typedjson
that should return a more compatible typing for the whole Remix ecosystem instead?Beta Was this translation helpful? Give feedback.
All reactions