react-use-callback
Installation
SKILL.md
React: useCallback Best Practices
Core Principle
useCallback caches a function definition between re-renders until its dependencies change.
Only use useCallback for specific performance optimizations - not by default.
When to Use useCallback
1. Passing Callbacks to Memoized Children
When passing a function to a component wrapped in memo():
import { useCallback, memo } from 'react';