Skip to content

fix: wrap useMemo callback in inline function to fix lint error#1086

Open
EugeniyKiyashko wants to merge 1 commit intomasterfrom
fix/usememo-lint-error
Open

fix: wrap useMemo callback in inline function to fix lint error#1086
EugeniyKiyashko wants to merge 1 commit intomasterfrom
fix/usememo-lint-error

Conversation

@EugeniyKiyashko
Copy link
Copy Markdown
Contributor

@EugeniyKiyashko EugeniyKiyashko commented Apr 17, 2026

The react-hooks/use-memo ESLint rule requires the first argument to be an inline function expression.

Before:

const items = useMemo(
  normalizePath,
  []
);

After:

const items = useMemo(
  () => normalizePath(),
  []
);

@EugeniyKiyashko EugeniyKiyashko self-assigned this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant