Skip to content

Commit fcd9dfa

Browse files
committed
update docs for data mode
1 parent 6d277b3 commit fcd9dfa

File tree

7 files changed

+649
-729
lines changed

7 files changed

+649
-729
lines changed

docs/content/01-started/01-installation.mdx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm install react-router-devtools -D
1414

1515
This will install it as a dev dependency in your project.
1616

17-
## Enabling the tools
17+
## Enabling the tools (framework mode)
1818

1919
After you have installed the tools, you need to go to your `vite.config.ts` file which will probably look something like this:
2020

@@ -48,6 +48,32 @@ Make sure your plugin is BEFORE the react router one!
4848
</WarningAlert>
4949

5050

51+
## Enabling the tools (data/declarative mode)
52+
53+
If you are using React Router in data/declarative mode, you can still use the devtools
54+
by first installing @tanstack/react-devtools and then adding the devtools somewhere under
55+
the router provider in your app.
56+
57+
```tsx
58+
import { TanStackDevtools } from '@tanstack/react-devtools';
59+
import { EmbeddedDevTools } from 'react-router-devtools';
60+
61+
export function App() {
62+
return (
63+
<>
64+
<YourRouterProvider>
65+
<YourAppComponents />
66+
<TanStackDevtools plugins=[{
67+
name: "React Router",
68+
render: <EmbeddedDevTools />
69+
}] />
70+
</YourRouterProvider>
71+
<TanStackDevtools />
72+
</>
73+
);
74+
}
75+
```
76+
5177
react-router-devtools uses @tanstack/devtools as the base for the UI, you can refer to their
5278
[documentation](https://tanstack.com/devtools/latest/docs/overview) for more information on how to use the devtools interface.
5379

docs/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
"@content-collections/remix-vite": "0.2.2",
3737
"@epic-web/client-hints": "1.3.5",
3838
"@forge42/seo-tools": "1.3.0",
39-
"@react-router/node": "7.9.3",
39+
"@react-router/node": "7.9.5",
4040
"@tsparticles/engine": "^3.3.0",
4141
"@tsparticles/react": "^3.0.0",
4242
"@tsparticles/slim": "^3.3.0",
4343
"clsx": "2.1.1",
44-
"framer-motion": "^11.0.8",
44+
"framer-motion": "^12.23.24",
4545
"hono": "4.6.20",
4646
"i18next": "24.2.2",
4747
"i18next-browser-languagedetector": "8.0.2",
@@ -64,11 +64,11 @@
6464
"devDependencies": {
6565
"@babel/preset-typescript": "7.26.0",
6666
"@dotenvx/dotenvx": "1.34.0",
67-
"@react-router/dev": "7.9.3",
67+
"@react-router/dev": "7.9.5",
6868
"@tailwindcss/typography": "0.5.16",
6969
"@tailwindcss/vite": "^4.1.4",
70-
"@testing-library/react": "16.2.0",
71-
"@types/node": "22.13.1",
70+
"@testing-library/react": "16.3.0",
71+
"@types/node": "24.10.0",
7272
"@types/prompt": "1.1.9",
7373
"@types/react": "^19.1.2",
7474
"@types/react-dom": "^19.1.2",
@@ -78,16 +78,16 @@
7878
"@vitest/coverage-v8": "3.0.5",
7979
"@vitest/ui": "3.0.5",
8080
"babel-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
81-
"chalk": "5.4.1",
82-
"happy-dom": "16.8.1",
81+
"chalk": "5.6.2",
82+
"happy-dom": "20.0.10",
8383
"npm-run-all": "4.1.5",
8484
"playwright": "1.50.1",
8585
"prompt": "1.3.0",
8686
"react-router-devtools": "*",
8787
"tailwindcss": "4.0.9",
88-
"tsx": "4.19.2",
89-
"typescript": "^5.8.3",
90-
"vite": "^6.3.3",
88+
"tsx": "4.20.6",
89+
"typescript": "^5.9.3",
90+
"vite": "^7.2.2",
9191
"vite-plugin-babel": "1.3.0",
9292
"vite-plugin-icons-spritesheet": "3.0.1",
9393
"vite-tsconfig-paths": "5.1.4",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"devDependencies": {
5151
"@biomejs/biome": "^1.9.4",
5252
"@changesets/cli": "^2.29.0",
53-
"@types/node": "22.13.1",
53+
"@types/node": "24.10.0",
5454
"knip": "5.43.6",
5555
"lefthook": "^1.11.10",
5656
"nx": "^21.6.3",

packages/react-router-devtools/package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -102,49 +102,49 @@
102102
"vite": ">=5.0.0 || >=6.0.0"
103103
},
104104
"devDependencies": {
105-
"@react-router/dev": "7.9.3",
106-
"@react-router/node": "7.9.3",
107-
"@react-router/serve": "7.9.3",
105+
"@react-router/dev": "7.9.5",
106+
"@react-router/node": "7.9.5",
107+
"@react-router/serve": "7.9.5",
108108
"@tanstack/devtools": "^0.8.1",
109-
"@testing-library/dom": "^10.4.0",
110-
"@testing-library/react": "16.2.0",
109+
"@testing-library/dom": "^10.4.1",
110+
"@testing-library/react": "16.3.0",
111111
"@types/babel__core": "^7.20.5",
112112
"@types/babel__generator": "^7.27.0",
113113
"@types/babel__traverse": "^7.28.0",
114-
"@types/node": "22.13.1",
114+
"@types/node": "24.10.0",
115115
"@vitest/coverage-v8": "3.0.5",
116116
"@vitest/ui": "3.0.5",
117-
"happy-dom": "16.8.1",
118-
"jest-preview": "^0.3.1",
117+
"happy-dom": "20.0.10",
118+
"jest-preview": "^0.3.2",
119119
"npm-run-all": "4.1.5",
120-
"tsup": "^8.3.6",
121-
"tsx": "4.19.2",
122-
"typescript": "^5.8.3",
123-
"vite": "^6.3.3",
124-
"vite-node": "^3.1.2",
120+
"tsup": "^8.5.0",
121+
"tsx": "4.20.6",
122+
"typescript": "^5.9.3",
123+
"vite": "^7.2.2",
124+
"vite-node": "^5.0.0",
125125
"vitest": "3.0.5"
126126
},
127127
"dependencies": {
128-
"@babel/core": "^7.26.10",
129-
"@babel/generator": "^7.26.5",
130-
"@babel/parser": "^7.26.10",
131-
"@babel/traverse": "^7.26.10",
132-
"@babel/types": "^7.26.10",
133-
"@radix-ui/react-accordion": "^1.2.2",
134-
"@tanstack/devtools-event-client": "^0.3.3",
128+
"@babel/core": "^7.28.5",
129+
"@babel/generator": "^7.28.5",
130+
"@babel/parser": "^7.28.5",
131+
"@babel/traverse": "^7.28.5",
132+
"@babel/types": "^7.28.5",
133+
"@radix-ui/react-accordion": "^1.2.12",
134+
"@tanstack/devtools-event-client": "^0.3.4",
135135
"@tanstack/devtools-vite": "^0.3.11",
136-
"@tanstack/react-devtools": "^0.8.0",
137-
"chalk": "5.4.1",
136+
"@tanstack/react-devtools": "^0.8.1",
137+
"chalk": "5.6.2",
138138
"clsx": "2.1.1",
139-
"framer-motion": "^11.0.8",
139+
"framer-motion": "^12.23.24",
140140
"goober": "^2.1.18",
141-
"react-d3-tree": "^3.6.4",
142-
"react-hotkeys-hook": "^4.6.1",
143-
"react-tooltip": "^5.28.0"
141+
"react-d3-tree": "^3.6.6",
142+
"react-hotkeys-hook": "^5.2.1",
143+
"react-tooltip": "^5.30.0"
144144
},
145145
"optionalDependencies": {
146-
"@biomejs/cli-darwin-arm64": "^1.9.4",
147-
"@rollup/rollup-darwin-arm64": "^4.32.1",
148-
"@rollup/rollup-linux-x64-gnu": "^4.32.1"
146+
"@biomejs/cli-darwin-arm64": "^2.3.5",
147+
"@rollup/rollup-darwin-arm64": "^4.53.2",
148+
"@rollup/rollup-linux-x64-gnu": "^4.53.2"
149149
}
150150
}

0 commit comments

Comments
 (0)