Skip to content

Conversation

@shahzeb1
Copy link

This is the correct signature for prefetchQuery:

await queryClient.prefetchQuery({ queryKey, queryFn })

I noticed the docs were using a slightly stale signature.

Thank you for building an amazing library. :)

This is the correct signature for [prefetchQuery](https://tanstack.com/query/v4/docs/react/reference/QueryClient#queryclientprefetchquery): 

```js
await queryClient.prefetchQuery({ queryKey, queryFn })
```

I noticed the docs were using a slightly stale signature.

^(Thank you for building an amazing library.)
@vercel
Copy link

vercel bot commented Nov 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Nov 24, 2023 3:15am

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d05a2ab:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@TkDodo
Copy link
Collaborator

TkDodo commented Nov 24, 2023

thanks 🙏

@TkDodo TkDodo merged commit 377a7b1 into TanStack:v4 Nov 24, 2023
@shahzeb1 shahzeb1 deleted the patch-1 branch November 24, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants