use getDerivedStateFromProps instead of componentWillReceiveProps (#6907)
use getDerivedStateFromProps instead of componentWillReceiveProps (#6907)

* use getDerivedStateFromProps

* remove semicolons

rackt/react-router,ReactTraining/react-router,ReactTraining/react-router,reactjs/react-router,rackt/react-router,reactjs/react-router,ReactTraining/react-router,ReactTraining/react-router