Skip to content
Advertisement

Tag: react-usememo

Access latest state in useMemo

I am using react-quill, and it’s requirement is that modules prop must be cached and shouldn’t change. I am using useMemo hook to memoize it. The object is: and it’s used like: handleFunc in modules object, just console logs value prop. The issue is that value is not latest, it’s the first value. I tried same thing in class component

Advertisement