Skip to content

Commit 5fe1332

Browse files
Remove debugging changes
1 parent 2549729 commit 5fe1332

File tree

3 files changed

+1
-59
lines changed

3 files changed

+1
-59
lines changed

examples/react/basic/src/index.jsx

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,13 @@ import {
1010
} from '@tanstack/react-query'
1111
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
1212

13-
const queryClient = new QueryClient({
14-
defaultOptions: {
15-
queries: {
16-
staleTime: 60 * 1000,
17-
},
18-
},
19-
})
13+
const queryClient = new QueryClient()
2014

2115
function App() {
2216
const [postId, setPostId] = React.useState(-1)
2317

2418
return (
2519
<QueryClientProvider client={queryClient}>
26-
<Test />
27-
2820
<p>
2921
As you visit the posts below, you will notice them in a loading state
3022
the first time you load them. However, after you return to this list and
@@ -143,28 +135,5 @@ function Post({ postId, setPostId }) {
143135
)
144136
}
145137

146-
function Test() {
147-
const [id, setId] = React.useState(1)
148-
149-
const query = useQuery({
150-
queryKey: ['myquery', id],
151-
queryFn: async () =>
152-
await fetch(`https://swapi.dev/api/people/${id}`).then((r) => r.json()),
153-
})
154-
155-
return (
156-
<>
157-
<input onChange={(e) => setId(e.target.value)} value={id} />
158-
{query.isPending ? (
159-
<p>Loading...</p>
160-
) : query.isError ? (
161-
<p>Error: {query.error.message}</p>
162-
) : (
163-
<pre>{JSON.stringify(query.data, null, 2)}</pre>
164-
)}
165-
</>
166-
)
167-
}
168-
169138
const rootElement = document.getElementById('root')
170139
ReactDOM.createRoot(rootElement).render(<App />)

examples/svelte/basic/src/routes/+layout.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
defaultOptions: {
99
queries: {
1010
enabled: browser,
11-
staleTime: 60 * 1000,
1211
},
1312
},
1413
})

examples/svelte/basic/src/routes/test/+page.svelte

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)