jazz-ui-development

1
0
Source

Use this skill when building, debugging, or optimizing Jazz applications. It covers Jazz's bindings with various different UI frameworks, as well as how to use Jazz without a framework. Look here for details on providers and context, hooks and reactive data fetching, authentication, and specialized UI components for media and inspection.

Install

mkdir -p .claude/skills/jazz-ui-development && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4191" && unzip -o skill.zip -d .claude/skills/jazz-ui-development && rm skill.zip

Installs to .claude/skills/jazz-ui-development

About this skill

Jazz UI Development

When to Use This Skill

  • Building user interfaces that display or interact with Jazz data
  • Setting up authentication providers and contexts
  • Debugging reactivity, data loading, or sync issues in the UI
  • Optimizing performance of data subscriptions
  • Handling media (images, files) in the UI

Do NOT Use This Skill For

  • Defining data schemas (use jazz-schema-design)
  • Complex permission logic or sharing workflows (use jazz-permissions-security)
  • Testing questions (use jazz-testing)

Key Heuristic for Agents

Use this skill when the user asks about rendering data, handling user input, managing authentication state, or framework-specific integration (React, Svelte, etc.). If the issue is "data not appearing" but permissions are correct, look here for loading and subscription patterns.

Framework Guides

Select the guide for your specific framework:

Universal CoValue API

These APIs are available on all CoValue instances, regardless of the framework.

Core Properties

All CoValues (CoMaps, CoLists, etc.) have these properties directly on the instance:

  • $isLoaded (boolean): Returns true if the CoValue is fully loaded and ready to read.
  • .toJSON(): Returns a plain JavaScript object representation of the CoValue. Use this for debugging only, not for rendering.

The .$jazz Namespace

Every CoValue instance has a .$jazz property containing metadata and utility methods.

Metadata

  • .$jazz.id (ID<CoValue>): The globally unique ID of the CoValue (e.g., co_zXy...).
  • .$jazz.owner (Group): The Group that owns this CoValue. Access control is determined by membership in this group.
  • .$jazz.createdAt (number): Creation timestamp (ms since epoch).
  • .$jazz.createdBy (ID<Account> | undefined): ID of the creating account.
  • .$jazz.lastUpdatedAt (number): Last update timestamp (ms since epoch).

Loading & Inspection

  • .$jazz.loadingState ("loading" | "loaded" | "unavailable" | "unauthorized"): The current loading state.
  • .$jazz.ensureLoaded({ resolve: { ... } }): Waits for nested references to load. Returns a promise with a new instance where requested fields are guaranteed available.
const detailedPost = await post.$jazz.ensureLoaded({
  resolve: {
    comments: {
      $each: {
        author: true 
      }
    }
  }
});
  • .$jazz.refs (CoMap/CoRecord only): Access nested CoValues as references (with IDs) without loading them.
  • .$jazz.has(key) (CoMap/CoRecord only): Checks if a key exists.

Subscription & Sync

  • .$jazz.subscribe(callback): Manually subscribe to changes. Returns an unsubscribe function. Prefer framework-specific hooks (e.g., useCoState) over this.
  • .$jazz.waitForSync(): Promise that resolves when changes are synced to peers. Useful for critical saves or logout flows.

Version Control

  • .$jazz.isBranched (boolean): Whether the CoValue is currently in a local branch.
  • .$jazz.branchName (string): The name of the current branch.
  • .$jazz.unstable_merge(): Merges a branch back into the main history.

Working with Data Types

CoMap / CoRecord

  • Read: Access properties like a standard JS object (e.g., user.name).
  • Write:
    • .$jazz.set(key, value)
    • .$jazz.delete(key)
    • .$jazz.applyDiff(diff)

CoList

  • Read: Access by index (list[0]), iterate (map, forEach).
  • Write:
    • .$jazz.push(item)
    • .$jazz.unshift(item)
    • .$jazz.splice(...)
    • .$jazz.remove(index or predicate)

CoText (CoPlainText / CoRichText)

  • Read: toString() or use directly in template.
  • Write:
    • insertAfter(index, text)
    • deleteRange({ from, to })
    • .$jazz.applyDiff(newText)

CoFeed

  • Read: Iterate over feed.all (returns per-session feeds).
  • Write: .$jazz.push(item) (Append-only).
// Subscribing to all entries across all accounts
const allEntries = Object.values(feed.perAccount).flatMap(accountFeed => Array.from(accountFeed.all));

// Pushing a new entry
feed.$jazz.push({ message: "Hello", timestamp: Date.now() });

DiscriminatedUnion

  • Read: Check the discriminator property (e.g. type) to narrow the type.
  • Write: Overwrite the property with a new object of the desired variant.
const list = co.list(MyUnion);
const item = list[0];

if (item.type === "text") {
  console.log(item.value); // item is narrowed to TextVariant
} else if (item.type === "image") {
  console.log(item.image.$jazz.id); // item is narrowed to ImageVariant
}

FileStream

  • Read: Use toBlob() or consume chunks.
  • Write: Use createFromBlob(blobOrFile) or start(metadata) -> push(chunk) -> end().

ImageDefinition

  • Read: Use <Image> component (framework specific) or loadImageBySize.
  • Write: use the createImage function from jazz-tools/media
<Image imageId={productImage.$jazz.id} width={300} />

Troubleshooting

"Data not appearing" or "Value is undefined"

  1. Check $isLoaded: Ensure you are checking if (coValue.$isLoaded) before rendering.
  2. Deep Loading: If nested data is missing, use resolve in your hook (e.g. useCoState(..., { resolve: { items: true } })).
  3. Provider Check: Ensure the component is wrapped in the appropriate <JazzProvider />.

"Infinite re-render loops"

  1. Selector Stability: Ensure your select function in useCoState is stable or returns stable references.
  2. Expensive Selectors: Move computations to useMemo instead of doing them inside the select function.
  3. Equality Function: Use equalityFn to prevent unnecessary updates if the selected data hasn't changed semantically.

"Reactivity not triggering"

  1. Direct Mutations: Ensure you are using .$jazz.set() or .$jazz.push() instead of direct property assignment (e.g. obj.key = val won't sync).
  2. Deep Updates: Remember that updating a nested scalar doesn't trigger a change in the parent CoValue unless that parent property is replaced.

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.