Partial hydration in SvelteKit using @11ty/is-land
This article discusses an experiment using SvelteKit and @11ty/is-land to add partial hydration to a SvelteKit site. The goal is to selectively hydrate individual components instead of the entire page. The article mentions that this is currently a proof-of-concept but may be packaged for reuse in the future. It provides instructions on how to get started with using this approach and explains how it works. The article also highlights some limitations of this approach and invites suggestions for improvement.
To use partial hydration with SvelteKit and @11ty/is-land, follow these steps:
/src/lib/islands
directory.package.json
for an example.component
, name
, props
, and islandProps
to configure the rendering of the component within the island.+page.svelte
for a complete example.This article explores the use of SvelteKit and @11ty/is-land to implement partial hydration in a SvelteKit site. It provides instructions on how to get started with using this approach and explains the process of rendering components within islands. The article also highlights some limitations of this approach and invites suggestions for improvement.