Skip to content

Commit dbfe8a0

Browse files
authored
chore(solid-query): Add devtools to examples (#6132)
1 parent 81f00b6 commit dbfe8a0

File tree

14 files changed

+65
-0
lines changed

14 files changed

+65
-0
lines changed

docs/config.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,35 @@
446446
{
447447
"label": "Overview",
448448
"to": "solid/overview"
449+
},
450+
{
451+
"label": "Devtools",
452+
"to": "solid/devtools"
453+
}
454+
]
455+
},
456+
{
457+
"label": "Examples",
458+
"children": [
459+
{
460+
"label": "Simple",
461+
"to": "solid/examples/solid/simple"
462+
},
463+
{
464+
"label": "Basic",
465+
"to": "solid/examples/solid/basic-typescript"
466+
},
467+
{
468+
"label": "Basic w/ GraphQL-Request",
469+
"to": "solid/examples/solid/basic-graphql-request"
470+
},
471+
{
472+
"label": "Default Query Function",
473+
"to": "solid/examples/solid/default-query-function"
474+
},
475+
{
476+
"label": "Solid Start",
477+
"to": "solid/examples/solid/solid-start-streaming"
449478
}
450479
]
451480
}

examples/solid/basic-graphql-request/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"license": "MIT",
1111
"dependencies": {
1212
"@tanstack/solid-query": "^5.0.0-rc.1",
13+
"@tanstack/solid-query-devtools": "^5.0.0-rc.9",
1314
"graphql": "^16.6.0",
1415
"graphql-request": "^6.1.0",
1516
"solid-js": "^1.7.8"

examples/solid/basic-graphql-request/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
QueryClient,
55
QueryClientProvider,
66
} from '@tanstack/solid-query'
7+
import { SolidQueryDevtools } from '@tanstack/solid-query-devtools'
78
import type { Accessor, Setter } from 'solid-js'
89
import { createSignal, For, Match, Switch } from 'solid-js'
910
import { render } from 'solid-js/web'
@@ -18,6 +19,7 @@ function App() {
1819

1920
return (
2021
<QueryClientProvider client={queryClient}>
22+
<SolidQueryDevtools />
2123
<p>
2224
As you visit the posts below, you will notice them in a loading state
2325
the first time you load them. However, after you return to this list and

examples/solid/basic-typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"license": "MIT",
1111
"dependencies": {
1212
"@tanstack/solid-query": "^5.0.0-rc.1",
13+
"@tanstack/solid-query-devtools": "^5.0.0-rc.9",
1314
"solid-js": "^1.7.8"
1415
},
1516
"devDependencies": {

examples/solid/basic-typescript/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
QueryClient,
55
QueryClientProvider,
66
} from '@tanstack/solid-query'
7+
import { SolidQueryDevtools } from '@tanstack/solid-query-devtools'
78
import type { Component, Setter } from 'solid-js'
89
import { createSignal, For, Match, Switch } from 'solid-js'
910
import { render } from 'solid-js/web'
@@ -138,6 +139,7 @@ const App: Component = () => {
138139

139140
return (
140141
<QueryClientProvider client={queryClient}>
142+
<SolidQueryDevtools />
141143
<p>
142144
As you visit the posts below, you will notice them in a loading state
143145
the first time you load them. However, after you return to this list and

examples/solid/default-query-function/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"license": "MIT",
1111
"dependencies": {
1212
"@tanstack/solid-query": "^5.0.0-rc.1",
13+
"@tanstack/solid-query-devtools": "^5.0.0-rc.9",
1314
"solid-js": "^1.7.8"
1415
},
1516
"devDependencies": {

examples/solid/default-query-function/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
QueryClient,
66
QueryClientProvider,
77
} from '@tanstack/solid-query'
8+
import { SolidQueryDevtools } from '@tanstack/solid-query-devtools'
89
import type { Setter } from 'solid-js'
910
import { createSignal, For, Match, Show, Switch } from 'solid-js'
1011
import { render } from 'solid-js/web'
@@ -34,6 +35,7 @@ function App() {
3435

3536
return (
3637
<QueryClientProvider client={queryClient}>
38+
<SolidQueryDevtools />
3739
<p>
3840
As you visit the posts below, you will notice them in a loading state
3941
the first time you load them. However, after you return to this list and

examples/solid/simple/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"license": "MIT",
1111
"dependencies": {
1212
"@tanstack/solid-query": "^5.0.0-rc.1",
13+
"@tanstack/solid-query-devtools": "^5.0.0-rc.9",
1314
"solid-js": "^1.7.8"
1415
},
1516
"devDependencies": {

examples/solid/simple/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
QueryClient,
55
QueryClientProvider,
66
} from '@tanstack/solid-query'
7+
import { SolidQueryDevtools } from '@tanstack/solid-query-devtools'
78
import { Match, Switch } from 'solid-js'
89
import { render } from 'solid-js/web'
910

@@ -12,6 +13,7 @@ const queryClient = new QueryClient()
1213
export default function App() {
1314
return (
1415
<QueryClientProvider client={queryClient}>
16+
<SolidQueryDevtools />
1517
<Example />
1618
</QueryClientProvider>
1719
)

examples/solid/solid-start-streaming/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@solidjs/meta": "^0.28.2",
1515
"@solidjs/router": "^0.7.0",
1616
"@tanstack/solid-query": "^5.0.0-rc.1",
17+
"@tanstack/solid-query-devtools": "^5.0.0-rc.9",
1718
"solid-js": "^1.7.8",
1819
"solid-start": "^0.2.23",
1920
"undici": "^5.22.1"

0 commit comments

Comments
 (0)