usePrefetchQuery for Vue – Would a PR be welcome?
#10155
Unanswered
thalassophilia
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.
-
I saw in this discussion that PRs for missing hooks in the Vue adapter are welcome, so I wanted to check in before submitting one.
What's missing
The React adapter has
usePrefetchQueryanduseInfiniteQueryPrefetch, but the Vue adapter currently doesn't expose these hooks. Right now, Vue users have to manually callqueryClient.prefetchQuery()inside onServerPrefetch or lifecycle hooks, which is a bit clunky compared to the React DX.What I'm proposing
I'd like to implement
usePrefetchQuery(and potentiallyusePrefetchInfiniteQuery) for the Vue adapter, mirroring the React implementation — a composable that calls prefetchQuery under the hood and integrates cleanly with Vue's SSR lifecycle (onServerPrefetch).Something like:
Questions before I open a PR
Is this still something the team would welcome?
Are there any design constraints or conventions in the Vue adapter I should be aware of before diving in?
Should usePrefetchInfiniteQuery be included in the same PR, or tackled separately?
Happy to follow whatever contribution guidelines are needed. Just want to make sure the direction is aligned before putting in the work. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions