Skip to content

Commit db7f3d9

Browse files
committed
docs(core, react): fixes to examples package.json, links and typos
1 parent a8d6947 commit db7f3d9

File tree

6 files changed

+29
-90
lines changed

6 files changed

+29
-90
lines changed

docs/configuration.md

Lines changed: 15 additions & 15 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
1010
## Devtools 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)

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

Lines changed: 4 additions & 4 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 our 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

@@ -108,7 +108,7 @@ export function createCounter() {
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] 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

examples/react/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@tanstack/devtools-event-client": "workspace:^",
13-
"@tanstack/react-devtools": "^0.2.2",
13+
"@tanstack/react-devtools": "workspace:^",
1414
"@tanstack/react-query": "^5.83.0",
1515
"@tanstack/react-query-devtools": "^5.83.0",
1616
"@tanstack/react-router": "^1.130.2",

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": "workspace:^",
13+
"@tanstack/react-devtools": "workspace:^",
1414
"react": "^19.1.0",
1515
"react-dom": "^19.1.0"
1616
},

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": "workspace:^",
1313
"@tanstack/solid-query": "^5.83.0",
1414
"@tanstack/solid-query-devtools": "^5.83.0",
1515
"@tanstack/solid-router": "^1.129.8",

pnpm-lock.yaml

Lines changed: 6 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)