no-use-effect
Enforces clean React code without direct useEffect hooks
All Skills in This Repository (1)
Pure Emerald Level IndicatorsFrequently Asked Questions
FAQPage SchemaHow to install no-use-effect?โผ
Run `npx skills add alejandrobailo/no-use-effect --all -g -y` in your terminal to install it globally.
Why avoid useEffect in React components?โผ
Direct useEffect calls often cause race conditions, extra renders, and stale-state bugs. This skill replaces them with derived state, event handlers, and data-fetching libraries that are easier to debug.
What should I use instead of useEffect for data fetching?โผ
Use a data-fetching library like React Query or SWR, which handles caching, cancellation, and retries automatically. In React 19+, you can also use the use() hook with Suspense.
Does no-use-effect work with React Native?โผ
Yes. The rules apply to both React and React Native codebases, covering new components, edits, reviews, and refactoring.
When is useEffect still allowed?โผ
Only inside reusable custom hooks like useMountEffect for true mount-time sync with external systems. Components themselves must never call useEffect directly.
Related Repositories in Software Engineering
View All in Software Engineeringโopenclaw
Run a personal AI assistant across your devices and chat apps
superpowers
Gives coding agents a disciplined workflow from idea to merged code
react
AI agent skills for building, testing, and porting React core