Skip to content

Commit 2c559db

Browse files
authored
docs: Update placeholder-query-data.md (TanStack#2212)
1 parent 2e03a61 commit 2c559db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/pages/guides/placeholder-query-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ In some circumstances, you may be able to provide the placeholder data for a que
4343

4444
```js
4545
function Todo({ blogPostId }) {
46-
const result = useQuery(['blogPost', blogPostId], () => fetch('/blogPosts'), {
46+
const result = useQuery(['blogPost', blogPostId], () => fetch(`/blogPosts/${blogPostId}`), {
4747
placeholderData: () => {
4848
// Use the smaller/preview version of the blogPost from the 'blogPosts' query as the placeholder data for this blogPost query
4949
return queryClient

0 commit comments

Comments
 (0)