-
Hello everyone, Thank you for building such an amazing ecosystem and community with TanStack. I have a question regarding the data loading strategy when using TanStack Start and Router (potentially with an external data loader like React Query v5). Specifically, is it possible to:
Any help or insights will be appreciated. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
ivawzh
Mar 24, 2025
Replies: 1 comment 3 replies
-
you can access the parent loader data via useLoaderData. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works! Thanks.
For other ppl's reference, see code below.
I do still have doubts on ensuring the immediate parent match is the exact route we want (e.g.
posts/
). It'd be nice to have explicit function likegetRouteApi(path: string)
. But its return is only useful under React context provider in component layer at the moment.