Patch Changes
-
1f9d41a: Public hydration API, so data libraries (Solid Router, TanStack Solid Query / Router) no longer reach into
sharedConfigfromsolid-js/internal:isHydrating()(solid-js): whether the running code is claiming server-rendered DOM — the root pass ofhydrate(), or code under a streamed boundary while that boundary resumes.falseon the server. Not reactive.isHydratable()(solid-js): whether the calling owner sits where hydration applies —falseunder<NoHydration>,trueagain inside a nested<Hydration>,falsewith 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 staysfalse.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;undefinedoutside 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 returnsfalse, and a promise underrenderToStringthrows. Writes are not gated on<NoHydration>: the library decides withisHydratable().takeHydrationValue(key)(@solidjs/web, client): reads and removes the value written underkey, as aHydrationValue—resolved,rejected, orpendingwith the streaming promise.undefinedon the server. Tests can seedglobalThis._$HY = { r: { key: value } }.- New types
HydrationWriterandHydrationValue(@solidjs/web).
-
Updated dependencies [b68a907]
-
Updated dependencies [1f9d41a]
- solid-js@2.0.0-rc.13