This allows `Route.Link` and `routeApi.Link` bindings instead of manual
`from`.
We never used to be able to do this due to circular issues but it seems
this is no longer an issue since all the changes to the types
---------
Co-authored-by: TkDodo <office@dorfmeister.cc>
Exposes the `ClientOnly` component for preventing rendering & hydration
errors.
## Background
When you attempt to prevent content from rendering using something like
`typeof document !== 'undefined'` as that type of conditional will cause
hydration errors.
## API
```tsx
import { ClientOnly, createRoute } from '@tanstack/react-router'
import { Charts, FallbackCharts } from './charts-that-break-server-side-rendering'
const Route = createRoute({
// ... other route options
path: '/dashboard',
component: Dashboard,
})
function Dashboard() {
return (
<div>
<p>Dashboard</p>
<ClientOnly fallback={<FallbackCharts />}>
<Charts />
</ClientOnly>
</div>
)
}
```
> [!NOTE]
> This component as is (other than I removed the `children` as a
`function`) in production on [joggr.io](https://joggr.io)
---------
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com>
Co-authored-by: Birk Skyum <birk.skyum@pm.me>
the vite manifest has a key named `css` which stores
the locations of the related CSS files tied to the
individual vite build artifacts.
this changes pulls those artifacts out at build time
and imports it during hydration.
this change works for both React and Solid. Solid has
a issue where deduplication isn't working at the
moment, but this change does not cause it so it should
be investigated separately
Fixes#3741
Added hash scroll handling directly in the React `Transitioner`
component's `onResolved`, similar to how it's implemented in the Solid
version
commit c7f7626ec7
Merge: 42d63bec31c71ab16c
Author: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Date: Tue Mar 4 12:55:03 2025 +1300
Merge branch 'main' into createFileRoute-without-path
commit 42d63bec35
Merge: 494ac4177633d13b76
Author: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Date: Mon Mar 3 01:23:28 2025 +1300
Merge branch 'main' into createFileRoute-without-path
commit 494ac41776
Author: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Sat Mar 1 08:05:48 2025 +0000
ci: apply automated fixes
commit f491a8c454
Author: Manuel Schiller <manuel.schiller@caligano.de>
Date: Sat Mar 1 02:46:35 2025 +0100
less verbose
commit 42329f7b2b
Author: Manuel Schiller <manuel.schiller@caligano.de>
Date: Sat Mar 1 02:30:43 2025 +0100
even less verbose
commit e38abb1d42
Author: Manuel Schiller <manuel.schiller@caligano.de>
Date: Sat Mar 1 01:56:16 2025 +0100
fix: createFileRoute without path
using `viteServer.transformIndexHtml`, extract the HMR add-ons used by `plugin-react` and inject them using `.injectHtml()`.
no more having to "fake HMR"