Skip to content

Commit

Permalink
chore: add devtools to with-tanstack-router example (#1848)
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum authored Mar 8, 2025
1 parent a696b99 commit 28e3fc5
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 8 deletions.
83 changes: 76 additions & 7 deletions examples/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/with-tanstack-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"version": "vinxi version"
},
"dependencies": {
"@tanstack/solid-router": "^1.112.2",
"@tanstack/solid-router": "^1.114.1",
"@tanstack/solid-router-devtools": "^1.114.1",
"@tanstack/router-plugin": "^1.112.0",
"@solidjs/start": "^1.1.2",
"solid-js": "^1.9.5",
Expand Down
4 changes: 4 additions & 0 deletions examples/with-tanstack-router/src/components/Devtools.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

import { TanStackRouterDevtools } from "@tanstack/solid-router-devtools";
export default TanStackRouterDevtools;

6 changes: 6 additions & 0 deletions examples/with-tanstack-router/src/routes/__root.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { Link, Outlet, createRootRoute } from "@tanstack/solid-router";

import { clientOnly } from "@solidjs/start";
import { Suspense } from "solid-js";


const Devtools = clientOnly(() => import("../components/Devtools"));

export const Route = createRootRoute({
component: RootComponent
});
Expand All @@ -12,6 +17,7 @@ function RootComponent() {
<Link to="/about">About</Link>
<Suspense>
<Outlet />
<Devtools />
</Suspense>
</>
);
Expand Down

0 comments on commit 28e3fc5

Please sign in to comment.