Skip to content

Commit ebd6570

Browse files
author
João Pedro Magalhães
authored
docs: query keys consistency (#4122)
1 parent 21eef3c commit ebd6570

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/adapters/react-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { QueryClient, QueryClientProvider, useQuery } from '@tanstack/react-quer
1212
const queryClient = new QueryClient()
1313

1414
function Example() {
15-
const query = useQuery('todos', fetchTodos)
15+
const query = useQuery(['todos'], fetchTodos)
1616

1717
return (
1818
<div>

docs/guides/background-fetching-indicators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A query's `status === 'loading'` state is sufficient enough to show the initial
88
```tsx
99
function Todos() {
1010
const { status, data: todos, error, isFetching } = useQuery(
11-
'todos',
11+
['todos'],
1212
fetchTodos
1313
)
1414

docs/guides/query-cancellation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ An `AbortSignal` can be set in the client `request` method.
100100
```tsx
101101
const client = new GraphQLClient(endpoint)
102102

103-
const query = useQuery('todos', ({ signal }) => {
103+
const query = useQuery(['todos'], ({ signal }) => {
104104
client.request({ document: query, signal })
105105
})
106106
```

0 commit comments

Comments
 (0)