React History Immunity (Undo/Redo)
CommunityMake undo/redo truly immune to React quirks.
Authorbibo1243
Version1.0.0
Installs0
System Documentation
What problem does it solve?
When building React Undo/Redo systems, you often encounter duplicate history entries due to React Strict Mode and race conditions on focus/blur or rapid actions.
Core Features & Use Cases
- Centralized history container using useRef to decouple history from UI state.
- Deep equality checks before pushing past/future entries to avoid identical states.
- Undo/Redo loops that skip identical entries to guarantee a meaningful state change.
- Suitable for forms, canvases, task boards, and any interactive UI needing reliable undo/redo.
Quick Start
Integrate a deep immunity undo/redo mechanism by wrapping your state with a useRef history container, gating pushes with a deep-equality check, and applying the looped filter during Undo/Redo.
Dependency Matrix
Required Modules
None requiredComponents
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: React History Immunity (Undo/Redo) Download link: https://github.com/bibo1243/claw_memory/archive/main.zip#react-history-immunity-undo-redo Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.