Skip to main content

you-might-not-need-an-effect

Analyze and fix useEffect anti-patterns in your code

Source facts

Repository
simstudioai/sim
Last source activity
October 10, 2026 at 06:17
Detected SKILL.md language
English
Stars
29,805
Forks
3,849

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
you-might-not-need-an-effect
description
Analyze and fix useEffect anti-patterns in your code
argument-hint
[scope] [fix=true|false]
# You Might Not Need an Effect Arguments: - scope: what to analyze (default: your current changes). Examples: "diff to staging", "PR #123", "src/components/", "whole codebase" - fix: whether to apply fixes (default: true). Set to false to only propose changes. User arguments: $ARGUMENTS Steps: 1. Read https://react.dev/learn/you-might-not-need-an-effect to understand the guidelines 2. Analyze the specified scope for useEffect anti-patterns 3. If fix=true, apply the fixes. If fix=false, propose the fixes without applying. ## Query-backed forms When query data supplies the initial values for an editable form, do not copy it into draft state in an Effect. Render loading chrome in an outer component, then mount a keyed form child once data exists and initialize its state lazily from props. Key by the resource identity so every related draft, dialog, and upload state resets together when the resource changes. Keep independent queries in the outer component to preserve parallel fetching.
View on GitHub