React router 7.0.0-pre.2 types for useFetcher and useActionData #12192
Unanswered
lasseklovstad
asked this question in
Q&A
Replies: 1 comment
-
@lasseklovstad https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v710 |
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
-
In the new prerelease I had some issue with the types return from useFetcher and useActionData when I return a redirect in the action function. I found it easier to throw the redirect because then the type returned from the redirect didn't get infered to the action data in useFetcher and useActionData.
Is it recommended to always throw the redirect to not have this issue with the types?
Beta Was this translation helpful? Give feedback.
All reactions