Skip to content

@solidjs/web@2.0.0-rc.13

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 30 Sep 06:10
· 32 commits to main since this release
5efaf26

Patch Changes

  • 1f9d41a: Public hydration API, so data libraries (Solid Router, TanStack Solid Query / Router) no longer reach into sharedConfig from solid-js/internal:

    • isHydrating() (solid-js): whether the running code is claiming server-rendered DOM — the root pass of hydrate(), or code under a streamed boundary while that boundary resumes. false on the server. Not reactive.
    • isHydratable() (solid-js): whether the calling owner sits where hydration applies — false under <NoHydration>, true again inside a nested <Hydration>, false with no owner; on the server it also requires the owner to belong to a render in progress. The client <Hydration> stays a passthrough: a client <NoHydration> zone renders only outside hydration, so there the answer stays false.
    • getHydrationWriter() (@solidjs/web, server): the caller's render's keyed server-to-client channel, found through the owner, else through the request scope when exactly one render is open for the request; undefined outside a render and on the client. write(key, value, { deferStream }) — the first write of a key wins, a key counts as written only once serialized, a write after the render closed returns false, and a promise under renderToString throws. Writes are not gated on <NoHydration>: the library decides with isHydratable().
    • takeHydrationValue(key) (@solidjs/web, client): reads and removes the value written under key, as a HydrationValue — resolved, rejected, or pending with the streaming promise. undefined on the server. Tests can seed globalThis._$HY = { r: { key: value } }.
    • New types HydrationWriter and HydrationValue (@solidjs/web).
  • Updated dependencies [b68a907]

  • Updated dependencies [1f9d41a]

    • solid-js@2.0.0-rc.13