Skip to content

Auto-hydrating islands

Compare
Choose a tag to compare
@sndrs sndrs released this 28 Apr 12:23
· 57 commits to main since this release
3aa8070

Previously, the page introspected for islands awaiting hydration, fetched the relevant modules then hydrated.

This means module loading was delayed until the DOM was ready and subsequently scanned.

Since we know at compile time which islands are used on any given page, we can load the necessary modules for each page with ordinary script tags in the page head.

The modules themselves can then search for their targets and hydrate them.

Full Changelog: 0.4.1...0.5.0