ai-agent-skills / frontend
nphausg/ai-agent-skills/.cursor/rules/frontend/react_hooks.mdc
React Hooks best practices for frontend package
Cursor rule2 starsChanged 5 months ago
--- description: React Hooks best practices for frontend package globs: - "packages/frontend/**" alwaysApply: true --- - Always use `useEffect` cleanup functions to avoid memory leaks. - Prefer `useCallback` and `useMemo` to optimize re-renders. - Avoid using class components; prefer functional components. - Avoid excessive use of `useState`; for complex state logic, use `useReducer`.
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

