How useRef turned out to be useMemo's father

from blog Vladimir Klepov as a Coder, | ↗ original
It's no secret that react's useCallback is just sugar on top of useMemo that saves the children from having to see an arrow chain. As the docs go: useCallback((e) => onChange(id, e.target.value), [onChange, id]);// is equivalent touseMemo(() => (e) => onChange(id, e.target.value), [onChange, id]); A less known, probably useless, but very fun,...