I added "use no memo" in a couple of places where I do unconventional tricks with hook deps. Example:
export function useMyCustomHook(
firstArgument: FirstArgument,
deps: React.DependencyList,
): void {
"use no memo";
React.useEffect(() => {
// logic around firstArgument
}, [
callback,
// eslint-disable-next-line react-hooks/exhaustive-deps -- ...deps are added by design
...deps,
]);
}
This hook cannot be memoised by design so I annotate it with "use no memo". The extension still marks my custom hook with 🚫 and lists it in the report amongst 🚫 failed cases. It'd be great to treat disabled memorisation differently. WDYT?
Possibly related: #67
I added
"use no memo"in a couple of places where I do unconventional tricks with hook deps. Example:This hook cannot be memoised by design so I annotate it with
"use no memo". The extension still marks my custom hook with 🚫 and lists it in the report amongst🚫 failedcases. It'd be great to treat disabled memorisation differently. WDYT?Possibly related: #67