How to pull data out of the route loader with react-query? #533
Unanswered
geoff-harper
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello, I'm taking this router and react-query for a spin and I'm wanting to make sure I'm doing it correctly. TkDodo's blog has a section about this when using react-query in conjunction with Ryan's react-router but I don't see any hooks that map to
useLoaderData
in this library. The react-query example in this router's docs just re-use the query hook by hand, but it has the issue described in the blog where data isT | undefined
. This is functional and will work for now but of course all that typing goodness would be appreciated. Is this doable now or on the roadmap?Beta Was this translation helpful? Give feedback.
All reactions