Is there a way to use this hook or some its analogue of the React API in the case of a class component?
I'm wondering, should I use some third party memo helpers in the case of a class component (eg. lodash memo, memoizeOne, etc.) or there is exist some official react API way for class components.
Thanks for any help.
P.S.
I want to generate uuid in the case of changed Children.
with SFC component I could use useMemo like this
const keyValue = useMemo(() => uuid()(), [children])
But how to achieve the same for class-based components without any thirdparty, etc.
P.P.S. I'm not using Redux, etc. only pure React.js