small typo
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Corrected a typo in the Router CLI installation guide by removing a
duplicated word (“your”) in the scripts section. Improves clarity and
professionalism of the instructions. No functional impact or behavior
changes. No configuration updates required; users don’t need to take any
action beyond reading the updated doc. Purely editorial change.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
Since the RC, serverOnly and clientOnly no longer exist, and we use
createServerOnlyFn and createClientOnlyFn. I updated the docs to reflect
that.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- New Features
- Introduced createServerOnlyFn and createClientOnlyFn helpers for
environment-bound execution.
- Documentation
- Updated guides, examples, import examples, error messages, and
tree-shaking notes to use the new helper names.
- Refactor
- Renamed public environment helpers (serverOnly → createServerOnlyFn,
clientOnly → createClientOnlyFn) and removed the old exports from the
public API.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
The docs make references to react in a lot of places. I updated the ones
I could find in the build-from-scratch guide to use proper solid-js
package names and other references.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation**
- Expanded "build from scratch" guide for migrating from React to
SolidJS.
- Added comprehensive mapping of React libraries, tooling, and plugins
to Solid equivalents.
- Documents alternative React tooling options and Solid-compatible
plugin recommendations.
- Clarifies updating JSX runtime and project configuration for SolidJS.
- Describes import/usage changes and fragment/JSX differences needed for
Solid.
- Notes removal of React-specific type artifacts during migration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
Co-authored-by: Nico Lynzaad <nlynzaad@zylangroup.com>
This fixes an unclosed Markdown code block in the `server-functions`
documentation page. Without the closing fence, the rest of the page
renders incorrectly.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Standardized code block formatting in the React Server Functions guide
by replacing four-backtick fences with standard triple backticks for
TypeScript snippets.
* Improves readability, syntax highlighting, and consistency across
examples, including route loading and basic parameter sections.
* No changes to behavior, APIs, or functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
Update installation instructions and routing configurations for TanStack
Start.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated React migration guide from Next.js with current routing
conventions and defaults.
* Adjusted installation guidance to reflect updated tooling and plugin
placement.
* Clarified new project layout defaults (explicit src directory and
routes location).
* Renamed and simplified example entry file and setup steps.
* Refreshed examples to use the new routing, link and server-function
patterns for parity with Next.js App Router.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
corrects broken links in the start docs
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated numerous cross‑reference links across React start guides
(authentication, execution model, server functions, environment
variables, middleware, router guides, migration) to point to correct
locations.
* Hosting guide: added a Netlify section with setup example; updated
Cloudflare Workers and Railway/Node.js anchors for clarity.
* Authentication docs: minor formatting tweaks.
* Server routes: removed merge conflict markers and cleaned content.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Tiny fix 😊
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Corrected middleware chaining in the React static server functions
example, replacing an erroneous double-dot with proper single-dot method
chaining.
* Example now compiles and accurately reflects the fluent API, improving
clarity for readers.
* No changes to public APIs or runtime behavior; this is a documentation
fix to prevent developer confusion.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Adding a new tutorial to Docs -> Tutorials
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* Documentation
* Added a step-by-step tutorial showing server-side route-loader
fetching from an external API into a TanStack Start React app (TMDB
example), covering project setup, env token usage, data flow (SSR),
loading/error states, UI samples, and testing instructions
(/fetch-movies).
* Chores
* Added a Tutorials entry linking the new guide into the React
documentation navigation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Incorporating feedback from PR -
https://github.com/TanStack/router/pull/4089. Changes made -
1. Moved images to `assets` folder on suggestion
2. Changed URLs from absolute to relative.
3. Adding an in-line sequence diagram
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Newly added jokes now receive unique identifiers, improving
reliability when creating new entries.
* **Documentation**
* Updated links to internal paths for SSR, router concepts, and React
Query sections.
* Switched images to repository-hosted assets for consistency and
availability.
* Replaced the data flow image with an inline Mermaid sequence diagram
covering home-page loading and add-joke flows, including data refresh
behavior.
* Minor formatting cleanup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
paths in "migrate from react location" and "migrate from react-router"
to the installation docs form installing Tanstack router returns 404.
This PR fixes the incorrect relative paths.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated installation guide links in the React migration guides for
TanStack Router to point to the correct “How to Install” page.
* Ensures migration steps reference the right documentation, improving
navigation for users following the guides.
* No functional or code changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The link to External Data Loading on the [Query
Integration](https://tanstack.com/router/latest/docs/integrations/query)
page currently throws a 404.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Corrected a link in the Router integrations guide to point to the
proper External Data Loading page in the React framework section. This
fixes navigation from that note and ensures readers can access the
referenced guidance without errors. No functional changes to the
product; content remains otherwise unchanged and reduces confusion.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes#5085
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated the Solid framework “Learn the Basics” guide to correct the
client hydration example, targeting the appropriate DOM root.
* Clarifies which element to hydrate, aligning the snippet with current
best practices and reducing confusion for readers.
* Improves copy‑paste reliability of the example for newcomers following
the setup steps.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The current `Link` component doesn't have `preloadTimeout` prop as
stated in the docs. This PR updates documentation to use the correct
`preloadDelay` prop.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated terminology from “Link Preloading Timeout” to “Link Preloading
Delay” to improve clarity.
* Revised examples to use the preloadDelay option instead of
preloadTimeout.
* Clarified that the default delay remains 50 ms.
* Ensured consistency across headings, descriptions, and code snippets
to match the current public API.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Inserted relevant logo files and/or blurbs re: Prisma Postgres in the
relevant places. Please review and edit as you see fit.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- Documentation
- Added a Prisma partner tile to the Partners section, linking to
prisma.io with tracking parameters and logo.
- Introduced a Prisma Postgres subsection in the React databases guide
with dark/light logos, feature highlights (edge-optimized, fits your
stack, web UI, auto-scaling, unikernel isolation), and CTAs; placed
after Neon.
- Added Prisma to the TanStack Start funded partners overview with logo
and description, positioned between Neon and Convex.
- No functional or API changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
When using relative routing we have 3 things to consider:
1) Is this relative to the current location? This is specifically
relevant for using `to="."` and `to=".."` in layout routes
2) Is this relative to the rendered route location?
3) Should this be relative to some other route in the tree
We have had a few issues where it hasn't been clear how relative routing
is applied in various scenarios, and where the application differs, for
example `to="."` and `to=".."` was treated differently.
This PR applies the following:
1) when no from path is specified, navigation is done from the current
location, this does not affect absolute paths but makes relative paths
more standardised.
2) other relative navigations require a from location to be specified.
This is achieved by setting Link and useNavigate to default to the
current active location instead of the rendered route location. This
also simplifies the logic in buildLocation as we no longer specifically
cater for `to="."`.
Included in this PR is the required changes to router-core
(buildLocation), react-router and solid-router (Link and useNavigate),
tests for both react-router and solid-router and an update to the docs
to clarify the usage.
This closes#4842
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added active-location hooks, origin-aware navigation helpers,
programmatic Route API for Link generation, browser-history utilities,
optional from origin for Navigate, and route fullPath exposure.
* **Bug Fixes**
* More deterministic relative navigation (., ..) resolution,
preservation of search/params, and runtime warnings for invalid origins.
* **Documentation**
* Clarified relative-link semantics and updated examples.
* **Tests**
* Vastly expanded end-to-end coverage for relative navigation, masking,
basepath, and trailing-slash permutations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Mark the `global` property of `NotFoundError` as deprecated
- Add a description for `headers`
- Sort the properties in order
Signed-off-by: leesb971204 <leesb971204@gmail.com>
Some of the properties of a route match in the store do not need to be
reactive (i.e. reactive = trigger the execution of all subscribers when
they change).
This PR proposes we add a `_nonReactive` key for storing these
properties.
Changes to properties in `_nonReactive` can be made like on a regular
object, without the need to call `__store.setState`, and without making
a shallow copy of the object.
The following properties were moved to `_nonReactive` (but more would be
welcome if we can find which ones):
- `beforeLoadPromise`
- `loaderPromise`
- `pendingTimeout`
- `loadPromise`
- `displayPendingPromise`
- `minPendingPromise`
- `dehydrated`
This results in the removal of 4 `updateMatch` calls in `router-core`.
At least 1 of which is in the hot-path of a navigation (`loadMatches` >
`validResolvedMatches.forEach`). And the removal of 2 `updateMatch`
calls in `packages/react-router/src/Match.tsx` (and solid-router too).
The `ssr` property was also updated to not be reactive, but kept outside
of `_nonReactive` because it is part of the public API. This removes
another call to `updateMatch`. This key is an exception, and if in the
future we find a need to have more "public but non-reactive" properties,
we could consider
- hiding internal props in a separate type, or
- adding a dev proxy to ensure non-reactive props aren't accessed inside
`select` functions
---
This PR adds a unit-test in `react-router` that counts how many times
the `select` inside a `useRouterState` hook is called during a
navigation. Without this PR, the result of this test is **26 calls**.
With this PR, we're down to **19 calls**.
---
Should be a partial improvement of
https://github.com/TanStack/router/issues/4359
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>