vani-ssr-hydration
Installation
SKILL.md
Vani SSR and Hydration
Instructions for rendering on the server and hydrating on the client with explicit activation.
When to Use
Use this when a project needs SSR or SSG, or when hydration must be selective.
Steps
- Render on the server with
renderToString(App())(arrays also work). - On the client, call
hydrateToDOM(App(), root)(arrays also work) to bind handles to anchors. - Activate interactivity by calling
handle.update()on the handles you want to run. - For selective hydration, update only specific handles (e.g., header) and leave others inert.
Arguments
- rootId - DOM id that contains server HTML (defaults to
app) - activateAll - whether to update all handles immediately (defaults to
true)
Related skills
More from itsjavi/vani
vani-spa-setup
Create a minimal Vani SPA root with explicit updates
8vani-jsx-setup
Configure and use JSX with Vani while keeping runtime behavior explicit
8vani-scheduling
Schedule explicit updates with microtasks and transitions
8vani-spa-app
Updates Vani SPA app UI in src/spa-app, especially the landing page/homepage and landing examples.
8vani-async-client-only
Use async components, fallbacks, and client-only islands
8vani-incremental-mount
Mount Vani components inside existing apps or DOM islands
8