S
SolidJS8mo ago
benten

Hydrating SSR - <Hydrate /> doesn't seem to rehydrate dehydrated app

This is what my SSR (and client) entry looks like
import {ErrorBoundary, Hydration, HydrationScript, NoHydration} from "solid-js/web";
import {DefaultLayout} from "./layouts/default";

export default function App() {
return (
<NoHydration>
<html>
<head>
<HydrationScript/>
<title>My App</title>
</head>
<body>
<Hydration>
<ErrorBoundary fallback={"Error."}>
<DefaultLayout/>
</ErrorBoundary>
</Hydration>
<script type={'module'} src={'./src/client.entry.tsx'}></script>
</body>
</html>
</NoHydration>
);
}
import {ErrorBoundary, Hydration, HydrationScript, NoHydration} from "solid-js/web";
import {DefaultLayout} from "./layouts/default";

export default function App() {
return (
<NoHydration>
<html>
<head>
<HydrationScript/>
<title>My App</title>
</head>
<body>
<Hydration>
<ErrorBoundary fallback={"Error."}>
<DefaultLayout/>
</ErrorBoundary>
</Hydration>
<script type={'module'} src={'./src/client.entry.tsx'}></script>
</body>
</html>
</NoHydration>
);
}
If I remove <NoHydration /> everything is fine, but with them there the app doesn't hydrate. No errors. I assume I'm doing something different than https://github.com/solidjs/solid-start/blob/main/packages/start/src/server/StartServer.tsx but I'm not sure what.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server