vani-async-client-only

Render async UI components with client-only islands and fallbacks.

Updated Sep 6, 2024
One-click install
npx skills add https://github.com/Jaylaelike/pm25-interactive-thaipbs-app --skill vani-async-client-only
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vani-async-client-only
Source: https://github.com/Jaylaelike/pm25-interactive-thaipbs-app/tree/main/.claude/skills/vani-async-client-only
Command: npx skills add https://github.com/Jaylaelike/pm25-interactive-thaipbs-app --skill vani-async-client-only

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers manage and render async UI components while safely isolating execution on the client, enabling smooth hydration and improved performance.

Core Features & Use Cases

  • Async components with deterministic render: define components that resolve to a render function and provide predictable SSR/CSR behavior.
  • Fallbacks for loading states: supply a user-friendly loading state during async work.
  • Client-only islands: render specific UI only on the client by opting into clientOnly behavior, reducing SSR load.
  • Use Case: You have a heavy analytics widget that should only run in the browser; use this Skill to load it asynchronously and mount after hydration.

Quick Start

Initialize an async component pattern with a fallback and clientOnly: true, then integrate into a page to render on the client after the SSR pass.

Frequently Asked Questions about vani-async-client-only

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render heavy UI components asynchronously without breaking SSR hydration?

To render heavy UI components asynchronously without breaking SSR hydration, use client-side islands with an async render function and a fallback loading state. This isolates execution on the client, ensuring smooth hydration and improved SSR performance.

What is a client-only island in frontend rendering?

A client-only island is a UI pattern that renders specific components exclusively in the browser after the initial SSR pass. By configuring `clientOnly: true`, it reduces server load and safely mounts heavy or dynamic widgets post-hydration.

How do I configure async components to load only on the client?

Configure async components to load only on the client by setting `clientOnly: true` alongside your async render function. Provide a user-friendly fallback for loading states to maintain a predictable UI during the asynchronous work.

Do I need special dependencies to use client-side islands for async UI?

No special dependencies are required to use client-side islands for async UI. This approach needs only standard project tooling to define async components with deterministic renders and manage SSR-safe hydration across your pages.

When should I use client-only rendering for frontend components?

Use client-only rendering for frontend components when you have heavy or dynamic UI, such as an analytics widget, that should only run in the browser. This prevents excessive SSR load and ensures the component mounts smoothly after hydration.