#3504·solid

Hydration Miss for DOM Updates from onSettled

Author: sabercoyCreated Sep 17, 2026Updated Sep 17, 2026

Describe the bug

reproduction - https://github.com/sabercoy/solid2-hydration

toaster.tsx:61 Hydration key miss for "1701020": no server-rendered element carries this key (template: <div>HYDRATION MISS). A detached element was created instead; its subtree will not appear in the document or become interactive. This usually means the server and client hydration id namespaces are misaligned — when hydrating a subtree of a larger server render, wrap the document shell in <NoHydration> and re-enter with <Hydration> around the hydrated subtree (or pass hydrate() a renderId matching the server's <Hydration id>).

A context was created and used in App.tsx called ToasterProvider.

typescript
export default function App() {
  return (
    <Router>
      {(props) => (
        <ToasterProvider>
          <Loading fallback={<main>Loading…</main>}>{props.children}</Loading>
        </ToasterProvider>
      )}
    </Router>
  );
}

It is used like this on the Home page

typescript
  const { addToast } = useToaster()

  onSettled(() => {
    addToast({ title: 'Test', message: 'test' }, 'firecrit')
  })

Inside the toaster context, it seems any reactive value in <Show when={...}> causes the inner elements to hydration miss

typescript
  return (
    <ToasterContext value={{ addToast }}>
      <Show when={toasts().length}>
        <div>HYDRATION MISS</div>
      </Show>
      {props.children}
    </ToasterContext>
  )

Your Example Website or App

https://github.com/sabercoy/solid2-hydration

Steps to Reproduce the Bug or Issue

bun i bun run dev look at browser console

Expected behavior

successful hydration

Screenshots or Videos

No response

Platform

  • OS: Fedora Linux
  • Browser: Chrome

Additional context

No response