score:0

Accepted answer

You can do it in componentDidUpdate:

componentDidUpdate(prevProps) {
  const {user} = this.props.auth;
  if (user && user._id && user._id !== prevProps.auth.user._id) {
    this.props.getMyLessons(user._id);
  }
}

Related Query

More Query from same tag