score:0

class MyComponent extends React.Component {
  componentDidMount() {
    myCustomLogic();
  }
  componentWillReceiveProps(nextProps) {
    if (nextProps.params.movieId !== this.props.params.movieId) {
      myCustomLogic();
    }
  }
  myCustomLogic() {
    ...
  }
}

score:0

componentWillReceiveProps(nextProps) {

    if(nextProps.match.params.movieId !== this.props.params.movieId) {
      window.scroll(0, 0);
      this.movieID = nextProps.match.params.movieId
      this.props.getMovieInfo(this.movieID);
      this.props.getMovie_YOUTUBE(this.movieID);
      this.props.getMovie_SIMILAR(this.movieID);
    }
}

Related Query

More Query from same tag