File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { createRoot } from 'react-dom/client'
22import Devtools from './setup'
33import { queryPlugin } from './plugin'
4+
45setTimeout ( ( ) => {
56 queryPlugin . emit ( 'test' , {
67 title : 'Test Event' ,
@@ -12,10 +13,11 @@ setTimeout(() => {
1213queryPlugin . on ( 'test' , ( event ) => {
1314 console . log ( 'Received test event:' , event )
1415} )
16+
1517function App ( ) {
1618 return (
1719 < div >
18- < h1 > TanStack Devtools Basic Example</ h1 >
20+ < h1 > TanStack Devtools React Basic Example</ h1 >
1921 < Devtools />
2022 </ div >
2123 )
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
22import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
33import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
44import {
5- Outlet ,
65 Link ,
7- createRouter ,
8- createRoute ,
6+ Outlet ,
7+ RouterProvider ,
98 createRootRoute ,
9+ createRoute ,
10+ createRouter ,
1011} from '@tanstack/react-router'
11- import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
1212import { TanstackDevtools } from '@tanstack/react-devtools'
1313
1414const rootRoute = createRootRoute ( {
@@ -24,7 +24,6 @@ const rootRoute = createRootRoute({
2424 </ div >
2525 < hr />
2626 < Outlet />
27- < TanStackRouterDevtools />
2827 </ >
2928 ) ,
3029} )
@@ -41,7 +40,11 @@ const indexRoute = createRoute({
4140 } ,
4241} )
4342function About ( ) {
44- return < div className = "p-2" > Hello from About!</ div >
43+ return (
44+ < div className = "p-2" >
45+ < h3 > Hello from About!</ h3 >
46+ </ div >
47+ )
4548}
4649
4750const aboutRoute = createRoute ( {
@@ -72,6 +75,7 @@ export default function DevtoolsExample() {
7275 } ,
7376 ] }
7477 />
78+ < RouterProvider router = { router } />
7579 </ QueryClientProvider >
7680 </ >
7781 )
Original file line number Diff line number Diff line change 11import { render } from 'solid-js/web'
22import Devtools from './setup'
3+
34function App ( ) {
45 return (
56 < div >
6- < h1 > TanStack Devtools Basic Example</ h1 >
7+ < h1 > TanStack Devtools Solid Basic Example</ h1 >
78 < Devtools />
89 </ div >
910 )
Original file line number Diff line number Diff line change @@ -2,20 +2,28 @@ import { QueryClient, QueryClientProvider } from '@tanstack/solid-query'
22import { SolidQueryDevtools } from '@tanstack/solid-query-devtools'
33import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools'
44import {
5+ Link ,
56 Outlet ,
6- createRouter ,
7- createRoute ,
7+ RouterProvider ,
88 createRootRoute ,
9+ createRoute ,
10+ createRouter ,
911} from '@tanstack/solid-router'
10- import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'
1112import { TanstackDevtools } from '@tanstack/solid-devtools'
13+
1214const rootRoute = createRootRoute ( {
1315 component : ( ) => (
1416 < >
15- < div class = "p-2 flex gap-2" > </ div >
17+ < div class = "p-2 flex gap-2" >
18+ < Link to = "/" class = "[&.active]:font-bold" >
19+ Home
20+ </ Link > { ' ' }
21+ < Link to = "/about" class = "[&.active]:font-bold" >
22+ About
23+ </ Link >
24+ </ div >
1625 < hr />
1726 < Outlet />
18- < TanStackRouterDevtools />
1927 </ >
2028 ) ,
2129} )
@@ -32,8 +40,13 @@ const indexRoute = createRoute({
3240 } ,
3341} )
3442function About ( ) {
35- return < div class = "p-2" > Hello from About!</ div >
43+ return (
44+ < div class = "p-2" >
45+ < h3 > Hello from About!</ h3 >
46+ </ div >
47+ )
3648}
49+
3750const aboutRoute = createRoute ( {
3851 getParentRoute : ( ) => rootRoute ,
3952 path : '/about' ,
@@ -65,6 +78,7 @@ export default function DevtoolsExample() {
6578 } ,
6679 ] }
6780 />
81+ < RouterProvider router = { router } />
6882 </ >
6983 )
7084}
You can’t perform that action at this time.
0 commit comments