Skip to content
Source
Sign inSign up
TanStack/router

Solid hydration #5518

Mergedbrenelz(GitHub profile, opens in a new tab)merged 19 commits intomain fromrefs/pull/5518/headmerged by birkskyum(GitHub profile, opens in a new tab)

Showing 26 changed files with 118 additions and 90 deletions (loading 23).

x
0 of 26 viewed, 26 left
18 additions and 6 deletionse2e/solid-start/basic-tsr-config/src/app/routes/__root.tsxModified
View file
@@ -1,6 +1,11 @@
-import * as Solid from 'solid-js'
-import { Outlet, createRootRoute } from '@tanstack/solid-router'
+import {
+ HeadContent,
+ Outlet,
+ Scripts,
+ createRootRoute,
+} from '@tanstack/solid-router'
import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'
+import { HydrationScript } from 'solid-js/web'
​
export const Route = createRootRoute({
head: () => ({
@@ -22,9 +27,16 @@
​
function RootComponent() {
return (
- <>
- <Outlet />
- <TanStackRouterDevtools position="bottom-right" />
- </>
+ <html>
+ <head>
+ <HydrationScript />
+ </head>