react-hooks/void-use-memo
eslint-plugin-react-hooks
Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See useMemo() docs for more information.
No code example for this rule
The linters' documentation does not include one we could extract.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
react-hooks/void-use-memo
eslint-plugin-react-hooks
react/void-use-memo
react plugin · correctness
Biome does not have this rule.
Validates against suppression of other rules
Validates against deriving values from state in an effect
Validates that useMemo() and useCallback() specify comprehensive dependencies without extraneous values. See useMemo() docs for more information.
import reactHooks from "eslint-plugin-react-hooks";
export default [
{
plugins: { "react-hooks": reactHooks },
rules: {
"react-hooks/void-use-memo": "error",
},
},
];{
"plugins": [
"react"
],
"rules": {
"react/void-use-memo": "error"
}
}