componentDidUpdate hook for react
npm install @rooks/use-did-update```
npm install rooks
or
``
yarn add rooks
Rooks is completely treeshakeable and if you use only 1 of the 50+ hooks in the package, only that hook will be bundled with your code. Your bundle will only contain the hooks that you need. Cheers!
!Build Status   
``
npm install --save @rooks/use-did-update
`javascript`
import useDidUpdate from "@rooks/use-did-update";
` Has updated - {hasUpdated.toString()} Please check the console for logs.jsx
function Demo() {
const [value, setValue] = useState(0);
const [hasUpdated, setHasUpdated] = useState(false);
useDidUpdate(() => {
console.log("Update");
setHasUpdated(true);
}, [value]);
return (
<>
>
);
}
render(
``