optimistic-update

Official

Instant UI feedback with optimistic updates.

AuthorDayopt
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill provides a robust pattern for applying optimistic updates to tRPC mutations, enabling immediate UI feedback while ensuring data integrity through controlled rollbacks.

Core Features & Use Cases

  • OnMutate snapshot: take a cache snapshot and apply optimistic changes.
  • OnError rollback: revert to the snapshot if the mutation fails.
  • OnSettled invalidation: refresh related queries after completion.
  • Realtime coordination: optionally synchronize with realtime streams to avoid conflicts.

Quick Start

Implement an optimistic mutation pattern by snapshotting the cache in onMutate, rolling back in onError, and invalidating queries in onSettled.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: optimistic-update
Download link: https://github.com/Dayopt/app/archive/main.zip#optimistic-update

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.