Analyze and fix unnecessary useState, derived state, and server-state-in-local-state anti-patterns
55
63%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/you-might-not-need-state/SKILL.mdArguments:
User arguments: $ARGUMENTS
This codebase uses React Query for all server state and Zustand for client-only global state. useState should only be used for ephemeral UI concerns (open/closed, hover, local form input). Server data should never be copied into useState or Zustand — React Query is the single source of truth.
Read these before analyzing:
useState + useEffect to sync React Query data into local state. Use query data directly. The only exception is forms where users edit server data.useState(prop) + useEffect(() => setState(prop)). Use the prop directly, reset with a remount key, or — for seed-on-transition (e.g. a modal opening) — adjust during render with the useState prev-tracker in .claude/rules/sim-hooks.md "State shape" (mind its sentinel-on-mount and no-useRef rules).selectedId not a copy of the selected object. Derive the object: items.find(i => i.id === selectedId).7945b29
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.