Version: v4.6.1use-did-updateAbout#componentDidUpdate hook for reactInstallation#npm install --save @rooks/use-did-updateCopyImporting the hook#import useDidUpdate from "@rooks/use-did-update";CopyUsage#function Demo() { const [value, setValue] = useState(0); const [hasUpdated, setHasUpdated] = useState(false); useDidUpdate(() => { console.log("Update"); setHasUpdated(true); }, [value]); return ( <> <button onClick={() => setValue(value + 1)}>Value is {value}</button> <p>Has updated - {hasUpdated.toString()}</p> <p>Please check the console for logs.</p> </> );} render(<Demo />);CopyCodesandbox Examples#Basic Usage#Join Bhargav's discord server#You can click on the floating discord icon at the bottom right of the screen and talk to us in our server.