一键导入
vani-ssr-hydration
Implement SSR, hydration, and selective activation with Vani
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement SSR, hydration, and selective activation with Vani
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a tiny global store with explicit subscriptions
Updates Vani SPA app UI in src/spa-app, especially the landing page/homepage and landing examples. Use when the user mentions Vani SPA app, src/spa-app, landing page/homepage, or landing examples.
Mount Vani components inside existing apps or DOM islands
Build scalable lists with keyed rows and per-item updates
Schedule explicit updates with microtasks and transitions
Create a minimal Vani SPA root with explicit updates
| name | vani-ssr-hydration |
| description | Implement SSR, hydration, and selective activation with Vani |
Instructions for rendering on the server and hydrating on the client with explicit activation.
Use this when a project needs SSR or SSG, or when hydration must be selective.
renderToString(App()) (arrays also work).hydrateToDOM(App(), root) (arrays also work) to bind handles to anchors.handle.update() on the handles you want to run.app)true)[])Example 1 usage pattern:
SSR a page, hydrate on the client, then call handle.update() for all handles.
Example 2 usage pattern:
Hydrate a page but activate only the header using a ComponentRef.
Example output:
Created: server/render.ts
Updated: client/entry.ts
Notes: Hydration binds to anchors; update() activates UI.
name: vani-ssr-hydration description: Apply Vani SSR, hydration, and client-only islands correctly. argument-hint: "[rendering mode or feature]"
Use this skill when implementing SSR, SSG, hydration, or client-only islands.
Follow these steps:
renderToString() on the server (single or array).hydrateToDOM() (single or array); do not expect it to render.handle.update() on chosen handles.clientOnly: true for islands that should skip SSR.@vanijs/vani or other public packages.handle.update().