Move the logic in componentDidUpdate to a functional component, that is: if the scroll in overlay context is now disabled and it wasn't disabled before, then call setClickable(true). Or in more human way: if a modal that was previously blocking scroll etc. disappeared then the message with the multimedia is clickable again.