File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/routes/reference/rendering Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ tags:
1010 - events
1111version : " 1.0"
1212description : >-
13- Emit the hydration bootstrap script with `HydrationScript` or
13+ Generate the SSR hydration bootstrap script with `HydrationScript` or
1414 `generateHydrationScript`.
1515---
1616
17- ` HydrationScript ` and ` generateHydrationScript ` emit Solid's hydration bootstrap script.
17+ ` HydrationScript ` and ` generateHydrationScript ` generate Solid's SSR hydration bootstrap script.
1818
1919## Import
2020
@@ -70,10 +70,10 @@ Delegated event names captured before client scripts load.
7070
7171## Behavior
7272
73- - The hydration script bootstraps delegated event replay before the runtime loads.
74- - ` HydrationScript ` returns JSX for server-rendered HTML output .
75- - ` generateHydrationScript ` returns a string for manual HTML generation.
76- - In browser-only bundles, these exports are no-op placeholders.
73+ - The generated script initializes ` window._$HY ` and bootstraps delegated event replay before the runtime loads.
74+ - The default captured delegated events are ` "click" ` and ` "input" ` unless ` eventNames ` is overridden .
75+ - ` HydrationScript ` returns JSX for server-rendered HTML output, and ` generateHydrationScript ` returns a string for manual HTML generation.
76+ - In browser bundles, these exports are placeholders that return ` undefined ` .
7777
7878## Examples
7979
@@ -82,6 +82,7 @@ Delegated event names captured before client scripts load.
8282``` tsx
8383import { HydrationScript } from " solid-js/web" ;
8484
85+ // Use when generating HTML on the server
8586<head >
8687 <HydrationScript />
8788</head >;
You can’t perform that action at this time.
0 commit comments