With react-router I can use the Link element to create links which are natively handled by react router.
react-router
Link
I see internally it calls t
t
In React-Router v4 and ES6
You can use withRouter and this.props.history.push.
withRouter
this.props.history.push
import {withRouter} from 'react-router-dom'; class Home extends Component { componentDidMount() { this.props.history.push('/redirect-to'); } } export default withRouter(Home);