Back to Skills

reactive-ui-patterns

spences10
Updated Today
19 views
5
5
View on GitHub
Designreactdesign

About

This skill provides reactive UI patterns for smooth in-place updates when working with remote functions. It enables managing loading states and preventing page jumps through the `.current` property on stored queries. Use it to maintain scroll position and create seamless user experiences during data refreshes.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/spences10/devhub-crm
Git CloneAlternative
git clone https://github.com/spences10/devhub-crm.git ~/.claude/skills/reactive-ui-patterns

Copy and paste this command in Claude Code to install this skill

Documentation

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 Repository

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

Related Skills

content-collections

Meta

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.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

Algorithmic Art Generation

Meta

This skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.

View skill

webapp-testing

Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill