<!-- One very short sentence on the WHAT and WHY of the PR. E.g. "Remove
pathHash attribute because it is confirmed unused." or "Add DNS round
robin to improve load distribution." -->
Add a comprehensive how-to guide for deploying TanStack Router to
production and establish a multi-PR process for future documentation.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Fixes#4673
I a bit simplified the `UseLinkReactProps` to make more use of typing
from React (and this simplification just fixes the bug)
Also added a test to check that the bug is no longer reproduced
Add new 'How-To' documentation section for React with a terse
installation guide to provide bite-sized, task-oriented instructions.
This new section aims to provide extremely concise, step-by-step
instructions for common tasks, making it easier for users and AI to
quickly find and follow specific procedures. Existing guides that
previously contained detailed installation steps now reference this new,
focused how-to guide to avoid content duplication and improve
discoverability.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Add documentation for prefix-based internationalization (i18n) using
Optional Path Parameters.
This PR adds a comprehensive guide on implementing i18n patterns,
covering:
- Prefix-based i18n routing (e.g., `/{-$locale}/about`)
- Complex i18n patterns with multiple optional parameters
- Language navigation using function-style `params` for `Link`
components
- Advanced i18n with route groups
- SEO best practices (canonical URLs, hreflang)
- Type safety for locale validation
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This PR addresses some flaky tests in the redirect e2e tests for
react-start and solid start.
Specifically, when testing external redirects use useServerFn it was
trying to reach out to http://example.com. This updates it to redirect
to the local dummy server.
This is a follow on from #4653
This PR resolves flaky E2E tests caused by port collisions when running
tests in parallel.
Instead of deriving ports from package names (which can collide), this
new approach assigns a random, available port to each test server
instance.
Key Changes:
- Random Port Allocation: Each test server (Playwright, dummy servers)
gets a unique, random port at startup.
- File-based Sync: The server writes its assigned port to a port.txt
file in its test project directory, this is kept unique through using
the package name or another input string for the file name.
- Test Runner Sync: The test runner reads the port from that file to
build the correct URL.
- Automatic Cleanup: All port files are deleted at the start of each
test:e2e run to ensure fresh ports.
Local parallel runs (up to 10) have shown this to be stable and free of
collisions.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
Co-authored-by: Indrek Ardel <indrek@ardel.eu>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
There's absolutely no reason not to use TanStack Start for purely static
sites - it works great, and it means that if you then want to transition
a codebase to being dynamically SSR, it requires zero work!
Added a note on using the `enableBeforeUnload` option in `useBlocker` +
example in the "Component-based blocking" section.
@schiller-manuel I wasn't sure if there should be an entire section for
this or just a note with 1-2 examples in the existing sections (I did
the latter).
Also thanks for pushing me to contribute even if it's a small one :)
Fixes#4599
# Previous behavior
```
$param
(group)
route.tsx
index.tsx
```
when router-generator processes the `route.tsx` node, the `split`
variable
8df504c3a4/packages/router-generator/src/generator.ts (L1258)
will be `[ '$param', '(group)' ]`, and because the last part is a group
8df504c3a4/packages/router-generator/src/generator.ts (L1263)
the whole route will be generated as pathless, i.e.
```ts
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const ParamgroupRouteRoute = ParamgroupRouteRouteImport.update({
id: '/$param/(group)',
////////////////
path: '/$param/', // <---- This will NOT be here without the fix
////////////////
getParentRoute: () => rootRouteImport,
} as any)
const ParamgroupIndexRoute = ParamgroupIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => ParamgroupRouteRoute,
} as any)
```
therefore the `$param` part of the path will be lost, and it won't be
included in `index.tsx`'s path resolution algorithm (in this case its
path would be `/`)
# Current behavior
When processing a route node, its path is skipped when all nodes between
it and the higher route are groups.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This PR closes#4623 by considering routeFileIgnorePattern when checking
for routeFilePrefix
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>