Edit in JSFiddle

// App.js

componentWillReceiveProps (nextProps) {
      Invoked when a component is receiving new props. This method is not called for the initial render.
      Use this as an opportunity to react to a prop transition before render() is called by updating the
      state using this.setState(). The old props can be accessed via this.props. Calling this.setState()
      within this function will not trigger an additional render.

    console.log('old: ' + this.props.params.turn);
    console.log('new: ' + nextProps.params.turn);

    if (this.props.params.turn !== undefined && nextProps.params.turn !== undefined) {
      // Update state if button clicked, this only happens when both old prop and new prop are not undefined and an integer
      this.setState((prevState) => (
        {...prevState, count: prevState.count + 1}