React hooks provides possibility to mimmic lifecycle method componentDidUpdate with useEffect without dependencies:
useEffect(() => {
// componentDidUpdate
});
How can I detect if some prop GOING TO update with react hooks?
Need to execute some code right before some changes.