Analyze and fix unnecessary useState, derived state, and server-state-in-local-state anti-patterns
60
70%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
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, or use a key to reset component state.selectedId not a copy of the selected object. Derive the object: items.find(i => i.id === selectedId).6f514c1
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.