MCP HubMCP Hub
スキル一覧に戻る

reactive-ui-patterns

spences10
更新日 Today
41 閲覧
5
5
GitHubで表示
デザインreactdesign

について

このスキルは、リモート関数を操作する際にスムーズなインプレース更新を実現するリアクティブUIパターンを提供します。保存されたクエリの`.current`プロパティを通じて、ローディング状態の管理とページのジャンプを防止することが可能です。データ更新時にスクロール位置を維持し、シームレスなユーザー体験を実現するためにご利用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/spences10/devhub-crm
Git クローン代替
git clone https://github.com/spences10/devhub-crm.git ~/.claude/skills/reactive-ui-patterns

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Reactive UI Patterns

Quick Start

<script lang="ts">
	const data_query = get_data(); // Store in variable for .current access

	async function save(id: string, value: string) {
		await update_data({ id, value });
		await data_query.refresh(); // Updates in place!
	}
</script>

{#if data_query.error}
	<p>Error loading data</p>
{:else if data_query.loading && data_query.current === undefined}
	<p>Loading...</p>
{:else}
	{@const items = data_query.current ?? []}
	<div class:opacity-60={data_query.loading}>
		{#each items as item}<!-- Content updates smoothly -->{/each}
	</div>
{/if}

Core Principles

  • Store queries: const query = get_data() enables .current property access
  • Use .current: Prevents page jumps, keeps scroll position during updates
  • Initial load only: Show spinner when .current === undefined, not on every refresh
  • Avoid {#await}: Causes jarring page reloads - use stored query pattern instead

Reference Files

GitHub リポジトリ

spences10/devhub-crm
パス: .claude/skills/reactive-ui-patterns

関連スキル

content-collections

メタ

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

スキルを見る

creating-opencode-plugins

メタ

This skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.

スキルを見る

polymarket

メタ

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

スキルを見る

cloudflare-turnstile

メタ

This skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.

スキルを見る