mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
🤖 A client-first, server-capable, fully type-safe router and full-stack framework for the web (React and more).
https://tanstack.com/router
framework
fullstack
javascript
react
route
router
routing
rpc
search
searchparams
server-functions
ssr
state-management
typesafe
typescript
url
- TypeScript 98.2%
- JavaScript 1.2%
- CSS 0.4%
- Vue 0.1%
- HTML 0.1%
- With `tanstackStart()` in a config that Vitest loads, test files are compiled as the app's code is: for the client in browser mode, jsdom and happy-dom, for the server in Node. A test run sets up no dev server, preview server or build. A project needs no router entry and no routes. The route tree is generated once, and route files are never written. - `mockServerFn` and `resetServerFnMocks` in `<framework>-start/testing`: in a client test a server function call goes to a mock that is typed from the function, in place of a request. - `runInRequest`, `mockMiddleware` and `runMiddleware` in `<framework>-start/testing/server`: a server test runs server functions and middleware for a request it describes. - Mocks end with the test that registered them. The plugin adds a setup file to every Vitest project for that. - In a test run the server finds a server function by its id alone. Vitest serves compiled modules from its cache from the second run on, so the compiler has no record of them. - In a test run Start names its packages in `resolve.noExternal` with regular expressions. Vitest's translation of the wildcards does not match a `-`, so jsdom and Node tests of an installed project ran `@tanstack/start-client-core` uncompiled. - `@tanstack/react-start` pre-bundles `@tanstack/react-store` by a path that also resolves from a project that depends on Start only. - `scripts/e2e/run-as-installed.mjs` runs an e2e project from a `pnpm deploy` copy, where `@tanstack/*` are in `node_modules` as in a user's project. - `e2e/react-start/vitest-library` and `e2e/react-start/vitest-app` run their tests with an empty Vitest cache, from the warm cache and as an installed project. - Docs: `docs/start/framework/react/guide/testing.md`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> |
History
|
|
|---|---|---|
| .agents/skills | ||
| .changeset | ||
| .devcontainer | ||
| .github | ||
| .nx | ||
| _artifacts | ||
| benchmarks | ||
| docs | ||
| e2e | ||
| examples | ||
| gpt | ||
| media | ||
| packages | ||
| scripts | ||
| skills/bundle-size-optimization | ||
| .coderabbit.yaml | ||
| .gitattributes | ||
| .gitignore | ||
| .npmrc | ||
| .nvmrc | ||
| .prettierignore | ||
| AGENTS.md | ||
| CONTRIBUTING.md | ||
| DEBUGGING.md | ||
| eslint.config.js | ||
| how-to-guides-implementation-plan.md | ||
| how-to-testing-plan.md | ||
| knip.json | ||
| labeler-config.yml | ||
| LICENSE | ||
| nx.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| prettier.config.js | ||
| README.md | ||
| top-10-how-to-guides.md | ||
| tsconfig.json | ||
TanStack RouterA modern router designed for type safety, data‑driven navigation, and seamless developer experience.
Read the Router Docs → |
TanStack StartA full‑stack framework built on Router, designed for server rendering, streaming, and production‑ready deployments.
Read the Start Docs → |
Get Involved
- We welcome issues and pull requests!
- Participate in GitHub discussions
- Chat with the community on Discord
- See CONTRIBUTING.md for setup instructions
Partners
|
|
|
|
|
|
|
|
|
|
|
|
We're looking for TanStack Router & Start Partners to join our mission! Partner with us to push the boundaries of TanStack Router & Start and build amazing things together.
LET'S CHATExplore the TanStack Ecosystem
- TanStack Config – Tooling for JS/TS packages
- TanStack DB – Reactive sync client store
- TanStack DevTools – Unified devtools panel
- TanStack Form – Type‑safe form state
- TanStack Pacer – Debouncing, throttling, batching
- TanStack Query – Async state & caching
- TanStack Ranger – Range & slider primitives
- TanStack Store – Reactive data store
- TanStack Table – Headless datagrids
- TanStack Virtual – Virtualized rendering
… and more at TanStack.com »