Skip to main content
Run any Skill in Manus
with one click

react-useref-duplicate-prevention-race

Stars1
Forks0
UpdatedFebruary 3, 2026 at 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.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly