SolidJSS
SolidJSโ€ข3y agoโ€ข
10 replies
Katja (katywings)

Different suspense boundaries between client and server

During my work I noticed that by using only one global suspense boundary, many components unnecessarily rerender on the server. Wrapping the components with Suspense boundaries would reduce the amount of rerenders on the server. But adding these extra suspense boundaries impacts the client side navigation experience.

What I'd like to do is to create different suspense boundaries depending if I am on the client or on the server, like so:

<Show when={isServer} fallback={<BlueprintComponent />}>
  <Suspense>
    <BlueprintComponent />
  </Suspense>
</Show>


Sadly this pattern results in hydration mismatches ๐Ÿ˜ .

Thank you in advance for any ideas and feedback!
Was this page helpful?