Skip to content

Commit 55ae3b8

Browse files
committed
chore: pr comments and tweeks
1 parent 04a8f91 commit 55ae3b8

File tree

4 files changed

+106
-13
lines changed

4 files changed

+106
-13
lines changed

docs/framework/react/basic-setup.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ TanStack devtools provides you with an easy to use and modular client that allow
77

88
## Setup
99

10-
Install the [TanStack Devtools](https://tanstack.com/devtools/) library, this will install the devtools core as well as provide you framework specific adapters.
10+
Install the [TanStack Devtools](https://www.npmjs.com/package/@tanstack/react-devtools) library, this will install the devtools core as well as provide you framework specific adapters.
1111

1212
```bash
13-
npm i @tanstack/devtools
13+
npm i @tanstack/solid-devtools
1414
```
1515

1616
Next in the root of your application import the `TanstackDevtools` from the required framework adapter (in this case @tanstack/react-devtools).
@@ -38,10 +38,14 @@ Currently TanStack offers:
3838
- `FormDevtools`
3939

4040
```tsx
41+
import { createRoot } from 'react-dom/client'
42+
4143
import { TanstackDevtools } from '@tanstack/react-devtools'
4244

43-
import { QueryDevtools } from '@tanstack/react-query'
44-
import { FormDevtools } from '@tanstack/react-form'
45+
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
46+
import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
47+
import { ReactFormDevtoolsPanel } from '@tanstack/react-form'
48+
4549

4650
import App from './App'
4751

@@ -53,11 +57,15 @@ createRoot(document.getElementById('root')!).render(
5357
plugins={[
5458
{
5559
name: 'Tanstack Query',
56-
render: <QueryDevtools />,
60+
render: <ReactQueryDevtoolsPanel />,
61+
},
62+
{
63+
name: 'Tanstack Router',
64+
render: <TanStackRouterDevtoolsPanel />,
5765
},
5866
{
5967
name: 'Tanstack Form',
60-
render: <FormDevtools />,
68+
render: <ReactFormDevtoolsPanel />,
6169
},
6270
]}
6371
/>

docs/framework/solid/basic-setup.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Basic setup
3+
id: basic-setup
4+
---
5+
6+
TanStack devtools provides you with an easy to use and modular client that allows you to compose multiple devtools into one easy to use panel.
7+
8+
## Setup
9+
10+
Install the [TanStack Devtools](https://www.npmjs.com/package/@tanstack/solid-devtools) library, this will install the devtools core as well as provide you framework specific adapters.
11+
12+
```bash
13+
npm i @tanstack/solid-devtools
14+
```
15+
16+
Next in the root of your application import the `TanstackDevtools` from the required framework adapter (in this case @tanstack/solid-devtools).
17+
18+
```tsx
19+
import { TanstackDevtools } from '@tanstack/solid-devtools'
20+
21+
import App from './App'
22+
23+
createRoot(document.getElementById('root')!).render(
24+
<StrictMode>
25+
<App />
26+
27+
<TanstackDevtools />
28+
</StrictMode>,
29+
)
30+
```
31+
32+
Import the desired devtools and provide it to the `TanstackDevtools` component along with a label for the menu.
33+
34+
Currently TanStack offers:
35+
36+
- `QueryDevtools`
37+
- `RouterDevtools`
38+
- `FormDevtools`
39+
40+
```tsx
41+
import { render } from 'solid-js/web';
42+
43+
import { TanstackDevtools } from '@tanstack/solid-devtools'
44+
45+
import { ReactQueryDevtoolsPanel } from '@tanstack/solid-query-devtools'
46+
import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools'
47+
import { ReactFormDevtoolsPanel } from '@tanstack/solid-form'
48+
49+
import App from './App'
50+
51+
render(() => (
52+
<>
53+
<App />
54+
55+
<TanstackDevtools
56+
plugins={[
57+
{
58+
name: 'Tanstack Query',
59+
render: () => <ReactQueryDevtoolsPanel />,
60+
},
61+
{
62+
name: 'Tanstack router',
63+
render: () => <TanStackRouterDevtoolsPanel />,
64+
},
65+
{
66+
name: 'Tanstack Form',
67+
render: () => <ReactFormDevtoolsPanel />,
68+
},
69+
]}
70+
/>
71+
</>
72+
), document.getElementById('root')!);
73+
```
74+
75+
Finally add any additional configuration you desire to the `TanstackDevtools` component, more information can be found under the [TanStack Devtools Configuration](https://tanstack.com/devtools/) section.
76+
77+
A complete working example can be found in our [examples section](https://tanstack.com/devtools/latest/docs/framework/solid/examples).
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
---
22
title: TanStack Devtools Solid Adapter
3-
ref: docs/framework/react/adapter.md
4-
replace: {
5-
"React": "Solid",
6-
"react": "solid"
7-
}
3+
ref: adapter
84
---
5+
6+
If you are using TanStack Devtools in a Solid application, we recommend using the Solid Adapter. The Solid Adapter provides a set of easy-to-use hooks on top of the core Devtools utilities. If you find yourself wanting to use the core Devtools classes/functions directly, the Solid Adapter will also re-export everything from the core package.
7+
8+
## Installation
9+
10+
```sh
11+
npm install @tanstack/solid-devtools
12+
```
13+
14+
## Solid Hooks
15+
16+
TODO

examples/react/basic/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ReactDOM from 'react-dom/client'
1+
import { createRoot } from 'react-dom/client'
22
import Devtools from './setup'
33
import { queryPlugin } from './plugin'
44
setTimeout(() => {
@@ -21,5 +21,5 @@ function App() {
2121
)
2222
}
2323

24-
const root = ReactDOM.createRoot(document.getElementById('root')!)
24+
const root = createRoot(document.getElementById('root')!)
2525
root.render(<App />)

0 commit comments

Comments
 (0)