# react-hooks > Use when creating or reviewing custom React hooks and hook usage patterns. - Author: minhtintrieu-ct - Repository: trieuminh98/rules-hub - Version: 20260129104448 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/trieuminh98/rules-hub - Web: https://mule.run/skillshub/@@trieuminh98/rules-hub~react-hooks:20260129104448 --- --- name: react-hooks description: "Use when creating or reviewing custom React hooks and hook usage patterns." alwaysApply: false globs: - "*.hook.ts" - "hooks/**" --- # React Hook Rules ## Hooks - Custom hooks MUST start with `use` prefix and `.hook.ts` suffix (e.g., `useUserData.hook.ts`, `useLocalStorage.hook.ts`). - Always return an object from custom hooks for better destructuring. - Always use `useCallback`, `useMemo` for functions and values - Always include ALL dependencies in dependency arrays - use ESLint plugin to enforce this. - Avoid calling hooks conditionally or in loops - always call at the top level. - Always add JSDOC