If you are updating the state of that component, that's exactly what the new getDerivedStateFromProps is designed for.
If you are doing something else (esp. fetching other data or some other side effect), componentDidUpdate is likely the best place (it receives prevProps as an argument, so you can compare old and new).