Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 839 Bytes

File metadata and controls

23 lines (18 loc) · 839 Bytes
title hydrationScript
function generateHydrationScript(options: {
	nonce?: string
	eventNames?: string[]
}): string

function HydrationScript(props: {
	nonce?: string
	eventNames?: string[]
}): JSX.Element

Hydration Script is a special script that should be placed once on the page to bootstrap hydration before Solid's runtime has loaded. It comes both as a function that can be called and inserted in an HTML string, or as a Component if you are rendering JSX from the <html> tag.

The options are for the nonce to be put on the script tag and any event names for that Solid should capture before scripts have loaded and replay during hydration. These events are limited to those that Solid delegates which include most UI Events that are composed and bubble. By default it is only click and input events.