Skip to content

Commit 5f40bfa

Browse files
authored
Merge pull request #25 from harry-whorlow/docs-fix
docs(core, react): fixes to examples package.json, links and typos
2 parents a8d6947 + ab8f752 commit 5f40bfa

File tree

11 files changed

+71
-83
lines changed

11 files changed

+71
-83
lines changed

docs/config.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,37 @@
2626
"to": "installation"
2727
}
2828
],
29+
2930
"frameworks": [
3031
{
3132
"label": "react",
3233
"children": [
3334
{
34-
"label": "React Adapter",
35+
"label": "Basic setup",
3536
"to": "framework/react/basic-setup"
37+
},
38+
{
39+
"label": "React adapter",
40+
"to": "framework/react/adapter"
3641
}
3742
]
3843
},
3944
{
4045
"label": "solid",
4146
"children": [
4247
{
43-
"label": "Solid Adapter",
48+
"label": "Basic setup",
4449
"to": "framework/solid/basic-setup"
50+
},
51+
{
52+
"label": "Solid Adapter",
53+
"to": "framework/solid/adapter"
4554
}
4655
]
4756
}
4857
]
4958
},
59+
5060
{
5161
"label": "Guides",
5262
"children": [],
@@ -55,7 +65,7 @@
5565
"label": "react",
5666
"children": [
5767
{
58-
"label": "Implementing a custom client",
68+
"label": "Custom plugins",
5969
"to": "framework/react/guides/custom-plugins"
6070
}
6171
]
@@ -66,6 +76,7 @@
6676
}
6777
]
6878
},
79+
6980
{
7081
"label": "API Reference",
7182
"children": [
@@ -95,6 +106,7 @@
95106
}
96107
]
97108
},
109+
98110
{
99111
"label": "Examples",
100112
"children": [],
@@ -105,6 +117,14 @@
105117
{
106118
"label": "Basic",
107119
"to": "framework/react/examples/basic"
120+
},
121+
{
122+
"label": "TanStack Start",
123+
"to": "framework/react/examples/start"
124+
},
125+
{
126+
"label": "Custom devtools",
127+
"to": "framework/react/examples/custom-devtools"
108128
}
109129
]
110130
},
@@ -120,4 +140,4 @@
120140
]
121141
}
122142
]
123-
}
143+
}

docs/configuration.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,39 @@ id: configuration
55

66
Both TanStack `DevTools` and `EventClient` can be configured.
77

8-
> **important** all configuration is optional unless marked (required)
8+
> [!IMPORTANT] all configuration is optional unless marked (required)
99
10-
## Devtools Configuration
10+
## Devtools Component Configuration
1111

12-
With the `Devtools` there are two configuration objects, regardless of Frameworks these are the same and are provided to the Devtools through props.
12+
The `Devtools` component has two configuration props, regardless of Frameworks these are the same.
1313

14-
- `config` configuration for the devtool panel and interaction with it
15-
- `eventBusConfig` configuration for the event bus
14+
- `config` - Configuration for the devtool panel and interaction with it.
15+
- `eventBusConfig` - Configuration for the event bus.
1616

1717
The `config` object is mainly focused around user interaction with the devtools panel and accepts the following properties:
1818

1919
- `defaultOpen` - If the devtools are open by default
2020

2121
```ts
22-
{defaultOpen: boolean}
22+
{ defaultOpen: boolean }
2323
```
2424

2525
- `hideUntilHover` - Hides the TanStack devtools trigger until hovered
2626

2727
```ts
28-
{hideUntilHover: boolean}
28+
{ hideUntilHover: boolean }
2929
```
3030

3131
- `position` - The position of the TanStack devtools trigger
3232

3333
```ts
34-
{position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle-left' | 'middle-right'}
34+
{ position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle-left' | 'middle-right' }
3535
```
3636

3737
- `panelLocation` - The location of the devtools panel
3838

3939
```ts
40-
{panelLocation: 'top' | 'bottom'}
40+
{ panelLocation: 'top' | 'bottom' }
4141

4242
```
4343

@@ -47,40 +47,40 @@ The `config` object is mainly focused around user interaction with the devtools
4747
type ModifierKey = 'Alt' | 'Control' | 'Meta' | 'Shift';
4848
type KeyboardKey = ModifierKey | (string & {});
4949

50-
{openHotkey: Array<KeyboardKey>}
50+
{ openHotkey: Array<KeyboardKey> }
5151
```
5252

5353
- `requireUrlFlag` - Requires a flag present in the url to enable devtools
5454

5555
```ts
56-
{requireUrlFlag: boolean}
56+
{ requireUrlFlag: boolean }
5757

5858
```
5959

6060
- `urlFlag` - The required flag that must be present in the url to enable devtools.
6161

6262
```ts
63-
{urlFlag: string}
63+
{ urlFlag: string }
6464
```
6565

6666
The `eventBusConfig` is configuration for the back bone of the devtools, the ``, and accepts the following properties:
6767

6868
- `debug` - Enables debug mode for the EventBus
6969

7070
```ts
71-
{debug: boolean}
71+
{ debug: boolean }
7272
```
7373

7474
- `connectToServerBus` - Optional flag to indicate if the devtools server event bus is available to connect to
7575

7676
```ts
77-
{connectToServerBus: boolean}
77+
{ connectToServerBus: boolean }
7878
```
7979

8080
- `port` - The port at which the client connects to the devtools server event bus
8181

8282
```ts
83-
{port: number}
83+
{ port: number }
8484
```
8585

8686
Put together here is an example in react:
@@ -148,4 +148,4 @@ class customEventClient extends EventClient<EventMap> {
148148
}
149149
```
150150

151-
More information about EventClient configuration can be found in our [custom-plugins example](https://tanstack.com/devtools/latest/docs/framework/react/examples/basic)
151+
More information about EventClient configuration can be found in our [custom-plugins example](https://tanstack.com/devtools/latest/docs/framework/react/examples/custom-devtools)
File renamed without changes.

docs/framework/react/basic-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ createRoot(document.getElementById('root')!).render(
7373
)
7474
```
7575

76-
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+
Finally add any additional configuration you desire to the `TanstackDevtools` component, more information can be found under the [TanStack Devtools Configuration](../../configuration.md) section.
7777

78-
A complete working example can be found in our [examples section](https://tanstack.com/devtools/latest/docs/framework/react/examples).
78+
A complete working example can be found in our [basic example](https://tanstack.com/devtools/latest/docs/framework/react/examples/basic).

docs/framework/react/guides/custom-plugins.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function createCounter() {
3333

3434
## Event Client Setup
3535

36-
Install the [TanStack Devtools Event Client](https://tanstack.com/devtools/) utils.
36+
Install the [TanStack Devtools Event Client](https://www.npmjs.com/package/@tanstack/devtools-event-client) utils.
3737

3838
```bash
3939
npm i @tanstack/devtools-event-client
@@ -67,7 +67,7 @@ export const DevtoolsEventClient = new FormEventClient()
6767

6868
## Event Client Integration
6969

70-
Now we need to hook our `EventClient` into out application code. This can be done in many way's, a UseEffect that emits the current state, or a subscription to an observer, all that matters is that when you want to emit the current state you do the following.
70+
Now we need to hook our `EventClient` into the application code. This can be done in many way's, a useEffect that emits the current state, or a subscription to an observer, all that matters is that when you want to emit the current state you do the following.
7171

7272
Our new library code will looks as follows:
7373

@@ -102,13 +102,13 @@ export function createCounter() {
102102
}
103103
```
104104

105-
> **Important** `EventClient` is framework agnostic so this process will be the same regardless of framework or even in vanilla JavaScript.
105+
> [!IMPORTANT] `EventClient` is framework agnostic so this process will be the same regardless of framework or even in vanilla JavaScript.
106106
107107
## Consuming The Event Client
108108

109109
Now we need to create our devtools panel, for a simple approach write the devtools in the framework that the adapter is, be aware that this will make the plugin framework specific.
110110

111-
> Because TanStack is framework agnostic we have taken a more complicated approach that will be explained in coming docs (if framework agnosticism is not a concern to you you can ignore this).
111+
> Because TanStack is framework agnostic we have taken a more complicated approach that will be explained in coming docs (if framework agnosticism is not a concern to you, you can ignore this).
112112
113113
DevtoolsPanel.ts
114114
```tsx
@@ -134,7 +134,7 @@ export function DevtoolPanel() {
134134

135135
## Application Integration
136136

137-
This step follows what's shown in [../basic-setup] for a more documented guide go check it out. As well as the complete [custom-plugin example](https://tanstack.com/devtools/latest/docs/framework/react/examples/custom-plugin) in our examples section.
137+
This step follows what's shown in [basic-setup](../basic-setup.md) for a more documented guide go check it out. As well as the complete [custom-devtools example](https://tanstack.com/devtools/latest/docs/framework/react/examples/custom-devtools) in our examples section.
138138

139139
Main.tsx
140140
```tsx
File renamed without changes.

examples/react/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12-
"@tanstack/devtools-event-client": "workspace:^",
12+
"@tanstack/devtools-event-client": "^0.2.1",
1313
"@tanstack/react-devtools": "^0.2.2",
1414
"@tanstack/react-query": "^5.83.0",
1515
"@tanstack/react-query-devtools": "^5.83.0",

examples/react/custom-devtools/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12-
"@tanstack/devtools-event-client": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-event-client@11",
13-
"@tanstack/react-devtools": "https://pkg.pr.new/TanStack/devtools/@tanstack/react-devtools@0a0219b",
12+
"@tanstack/devtools-event-client": "^0.2.1",
13+
"@tanstack/react-devtools": "^0.2.2",
1414
"react": "^19.1.0",
1515
"react-dom": "^19.1.0"
1616
},

examples/react/start/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"@prisma/extension-accelerate": "^2.0.2",
1818
"@prisma/studio-core": "^0.5.1",
1919
"@tailwindcss/vite": "^4.0.6",
20-
"@tanstack/devtools-event-bus": "workspace:^",
21-
"@tanstack/devtools-event-client": "workspace:^",
20+
"@tanstack/devtools-event-bus": "^0.2.1",
21+
"@tanstack/devtools-event-client": "^0.2.1",
2222
"@tanstack/react-devtools": "^0.2.2",
2323
"@tanstack/react-query": "^5.83.0",
2424
"@tanstack/react-query-devtools": "^5.83.0",
@@ -35,7 +35,7 @@
3535
"zod": "^4.0.14"
3636
},
3737
"devDependencies": {
38-
"@tanstack/devtools": "workspace:^",
38+
"@tanstack/devtools": "^0.2.1",
3939
"@testing-library/dom": "^10.4.0",
4040
"@testing-library/react": "^16.2.0",
4141
"@types/react": "^19.1.2",

examples/solid/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12-
"@tanstack/solid-devtools": "^0.2.2",
12+
"@tanstack/solid-devtools": "^0.2.1",
1313
"@tanstack/solid-query": "^5.83.0",
1414
"@tanstack/solid-query-devtools": "^5.83.0",
1515
"@tanstack/solid-router": "^1.129.8",

0 commit comments

Comments
 (0)