We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useMemo()
The useCallback quick fix is great! Perhaps we could provide a similar fix for useMemo? E.g. to convert
useCallback
useMemo
const value = expensiveFn({ someProp })
to
const value = useMemo(() => expensiveFn({ someProp }), [someProp])
or drop the dependency since the React lint rule will automatically fix that
const value = useMemo(() => expensiveFn({ someProp }), [])
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
useCallback
quick fix is great! Perhaps we could provide a similar fix foruseMemo
? E.g. to convertto
or drop the dependency since the React lint rule will automatically fix that
The text was updated successfully, but these errors were encountered: