Title: `npm create @tanstack/start@latest`, when set up with Query also includes Provider, but it is not used. · Issue #272 · TanStack/cli · GitHub
Open Graph Title: `npm create @tanstack/start@latest`, when set up with Query also includes Provider, but it is not used. · Issue #272 · TanStack/cli
X Title: `npm create @tanstack/start@latest`, when set up with Query also includes Provider, but it is not used. · Issue #272 · TanStack/cli
Description: Which project does this relate to? Create Tanstack App Describe the bug When setting up npm create @tanstack/start@latest, it also creates the folder src/integrations/tanstack-query with two files inside: root-provider.tsx devtools.tsx I...
Open Graph Description: Which project does this relate to? Create Tanstack App Describe the bug When setting up npm create @tanstack/start@latest, it also creates the folder src/integrations/tanstack-query with two files ...
X Description: Which project does this relate to? Create Tanstack App Describe the bug When setting up npm create @tanstack/start@latest, it also creates the folder src/integrations/tanstack-query with two files ...
Opengraph URL: https://github.com/TanStack/cli/issues/272
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`npm create @tanstack/start@latest`, when set up with Query also includes Provider, but it is not used.","articleBody":"### Which project does this relate to?\n\nCreate Tanstack App\n\n### Describe the bug\n\nWhen setting up `npm create @tanstack/start@latest`, it also creates the folder `src/integrations/tanstack-query` with two files inside:\n\n- `root-provider.tsx`\n- `devtools.tsx`\n\nInside `root-provider.tsx`, there is a Provider function (see both tRPC and non-tRPC snippet below)\n\nhttps://github.com/TanStack/create-tsrouter-app/blob/6110e61344d6fc002dbf371c89e39ce8f679789c/frameworks/react-cra/add-ons/tanstack-query/assets/src/integrations/tanstack-query/root-provider.tsx.ejs#L46-L58\n\nhttps://github.com/TanStack/create-tsrouter-app/blob/6110e61344d6fc002dbf371c89e39ce8f679789c/frameworks/react-cra/add-ons/tanstack-query/assets/src/integrations/tanstack-query/root-provider.tsx.ejs#L69-L79\n\nThey are not used anywhere in the template, and from the page [TanStack Query Integration](https://tanstack.com/router/v1/docs/integrations/query):\n> By default, the integration wraps your router with a QueryClientProvider. If you already provide your own provider, pass wrapQueryClient: false and keep your custom wrapper.\n\nThe code in the template is unused, so it may be removed.\n\n### Your Example Website or App\n\nhttps://tanstack.com/start/v0/docs/framework/react/quick-start\n\n### Steps to Reproduce the Bug or Issue\n\n1. Create a basic app with `npm create @tanstack/start@latest my-app -- --add-ons tanstack-query`\n2. View the contents of `src/integrations/tanstack-query/root-provider.tsx` with `cat`:\n```jsx\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\n\nexport function getContext() {\n const queryClient = new QueryClient()\n return {\n queryClient,\n }\n}\n\nexport function Provider({\n children,\n queryClient,\n}: {\n children: React.ReactNode\n queryClient: QueryClient\n}) {\n return (\n \u003cQueryClientProvider client={queryClient}>{children}\u003c/QueryClientProvider>\n )\n}\n```\n3. Look for files where Provider is mentioned with `grep`:\n```console\n$ grep -nr \"\\bProvider\" --exclude-dir=node_modules\nsrc/integrations/tanstack-query/root-provider.tsx:10:export function Provider({\n```\n\nAs we can see, excluding the file where it was defined, it is not used anywhere else.\n\n### Expected behavior\n\nAs a user, I expect unused code snippets to not be part of our template. However, in our case, there is a unused code that returns a `QueryClientProvider`, which is not used anywhere, and which won't be needed, since Router also has Query integration.\n\n### Screenshots or Videos\n\n_No response_\n\n### Platform\n\n- OS: Linux\n- Browser: Firefox\n- Version: 146.0-2\n\n\n### Additional context\n\n_No response_","author":{"url":"https://github.com/Ashvith10","@type":"Person","name":"Ashvith10"},"datePublished":"2025-12-31T10:36:25Z","url":"https://github.com/TanStack/cli/issues/272"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fbd3f871-0942-6db1-3563-9eb5c99a93ff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C228:2FCDB1:19433B3:227F14D:6AF9A425 |
| html-safe-nonce | 681e181c2b602fa1b3fd1f358073a5aa7fa55daa5db02086db99211ab0c30ba3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjI4OjJGQ0RCMToxOTQzM0IzOjIyN0YxNEQ6NkFGOUE0MjUiLCJ2aXNpdG9yX2lkIjoiMTM4MzkwNzIyNjk5MjM1NDM0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5618e0aaae7cc587629d610b07c1dd53e740bb2fd158b3cc5e4645602e2d1b2c |
| hovercard-subject-tag | issue:3772513099 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TanStack/cli/272/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7812f5c9fbaa275ac32dea5806718c79392f01b54e0b43cf0734c5650b8fa7f9/TanStack/cli/issues/272 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7812f5c9fbaa275ac32dea5806718c79392f01b54e0b43cf0734c5650b8fa7f9/TanStack/cli/issues/272 |
| og:image:alt | Which project does this relate to? Create Tanstack App Describe the bug When setting up npm create @tanstack/start@latest, it also creates the folder src/integrations/tanstack-query with two files ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Ashvith10 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| turbo-cache-control | no-preview |
| go-import | github.com/TanStack/cli git https://github.com/TanStack/cli.git |
| octolytics-dimension-user_id | 72518640 |
| octolytics-dimension-user_login | TanStack |
| octolytics-dimension-repository_id | 932949058 |
| octolytics-dimension-repository_nwo | TanStack/cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 932949058 |
| octolytics-dimension-repository_network_root_nwo | TanStack/cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width