prefer-use-callback
Suggests using useCallback
instead of useMemoized
when applicable.
Example
❌ Bad:
void fn() {
// LINT: Prefer 'useCallback' instead of 'useMemoized' for function expressions.
useMemoized(() => () => {}, keys);
}
✅ Good:
void fn() {
useCallback(() => {}, keys);
}