Merge pull request #5 from TanStack/feat/improve-plugin-handling · renchap/tanstack-devtools@80745ca · GitHub
Skip to content

Commit 80745ca

Browse files
authored
Merge pull request TanStack#5 from TanStack/feat/improve-plugin-handling
feat: improve react plugin handling to support contexts
2 parents 258adc5 + dcfc78d commit 80745ca

42 files changed

Lines changed: 1626 additions & 334 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎examples/react/basic/package.json‎

Lines changed: 3 additions & 3 deletions

‎examples/react/basic/src/setup.tsx‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const indexRoute = createRoute({
4343
function About() {
4444
return <div className="p-2">Hello from About!</div>
4545
}
46+
4647
const aboutRoute = createRoute({
4748
getParentRoute: () => rootRoute,
4849
path: '/about',
@@ -58,22 +59,20 @@ const queryClient = new QueryClient()
5859
export default function DevtoolsExample() {
5960
return (
6061
<>
61-
<Devtools
62-
plugins={[
63-
{
64-
name: 'Tanstack Query',
65-
render: (
66-
<QueryClientProvider client={queryClient}>
67-
<ReactQueryDevtoolsPanel />
68-
</QueryClientProvider>
69-
),
70-
},
71-
{
72-
name: 'Tanstack Router',
73-
render: <TanStackRouterDevtoolsPanel router={router} />,
74-
},
75-
]}
76-
/>
62+
<QueryClientProvider client={queryClient}>
63+
<Devtools
64+
plugins={[
65+
{
66+
name: 'Tanstack Query',
67+
render: <ReactQueryDevtoolsPanel />,
68+
},
69+
{
70+
name: 'Tanstack Router',
71+
render: <TanStackRouterDevtoolsPanel router={router} />,
72+
},
73+
]}
74+
/>
75+
</QueryClientProvider>
7776
</>
7877
)
7978
}

‎examples/react/start/.cta.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"projectName": "start",
3+
"mode": "file-router",
4+
"typescript": true,
5+
"tailwind": true,
6+
"packageManager": "pnpm",
7+
"git": false,
8+
"version": 1,
9+
"framework": "react-cra",
10+
"chosenAddOns": ["start"]
11+
}

‎examples/react/start/.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
count.txt
7+
.env
8+
.nitro
9+
.tanstack
10+
.output
11+
.vinxi
12+
todos.json
13+
14+
/generated/prisma
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/routeTree.gen.ts": true
4+
},
5+
"search.exclude": {
6+
"**/routeTree.gen.ts": true
7+
},
8+
"files.readonlyInclude": {
9+
"**/routeTree.gen.ts": true
10+
}
11+
}

‎examples/react/start/README.md‎

Lines changed: 287 additions & 0 deletions

0 commit comments

Comments
 (0)