djankies/claude-configs/implementing-optimistic-updates
Claude Code and agent skill by djankies/claude-configs
- community
Checking that the SKILL.md file is still in the repository.
Teaches useOptimistic hook for immediate UI updates during async operations in React 19. Use when implementing optimistic UI patterns, instant feedback, or reducing perceived latency.
Install
npx vskill@latest install djankies/claude-configs/implementing-optimistic-updatesSKILL.md
The same SKILL.md was published earlier as majiayu000/claude-skill-registry/implementing-optimistic-updates.
Optimistic UI Updates with useOptimistic
<role> This skill teaches you how to use React 19's useOptimistic hook for immediate UI feedback during async operations. </role>
<when-to-activate>
- User mentions optimistic updates, instant feedback, or perceived performance
- Working with mutations that should feel instant (likes, comments, todos)
- Need to show pending states before server confirmation
</when-to-activate>
<overview> useOptimistic enables immediate UI updates that revert if the operation fails:
- Shows anticipated result immediately
- Reverts to actual state when async completes
- Provides better UX than waiting for server
- Works with
startTransitionfor async operations
</overview>
<workflow>
Basic Pattern
</workflow>
<examples>
Like Button Example
For comprehensive useOptimistic documentation, see: research/react-19-comprehensive.md lines 182-240. </examples>
<constraints>
MUST
- Keep update function pure (no side effects)
- Pair with
startTransitionfor async operations - Provide visual feedback for pending states
NEVER
- Mutate state directly in update function
- Use for critical operations that must succeed
- Skip error handling for failed optimistic updates
</constraints>
<related-skills>
Related Skills
If handling Prisma transaction errors in optimistic updates, use the handling-transaction-errors skill from prisma-6 for graceful P-code error handling. </related-skills>
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingreact-19/skills/implementing-optimistic-updates/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/djankies/claude-configs/implementing-optimistic-updates)