In this GitHub issue I essentially proposed changing:
x = useCallback( ... , []);
To:
x = useRef( ... ).current;
The two are the same but with useRef
React doesn't compare the dependencies.
For which a reply came with a question:
Is there ever a situation where a dependency-less useMemo or useCallback would be a better choice than useRef?
I can't think of one, but I may have overlooked some use-cases.
So can anyone think of such situation?