Skip to main content
在 Manus 中运行任何 Skill
一键导入

react-useref-duplicate-prevention-race

星标1
分支0
更新时间2026年2月3日 07:54

Fix React duplicate detection race conditions using useRef for synchronous checks. Use when: (1) Rapid successive function calls bypass duplicate/spam detection despite state-based checking logic, (2) Rate limiting or cooldown logic fails when triggered multiple times quickly, (3) Duplicate items appear in lists despite deduplication code, (4) State-based guards don't prevent re-entry in event handlers. Solves race condition where multiple calls read the same stale state value before any setState completes. Covers React hooks patterns with useRef, useState, useCallback for duplicate prevention, spam protection, rate limiting, and synchronous guard checks.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly