:
1 - , , -
history.push('/newPath/');
, , ( ). "" ( ,
componentWillMount() {
if (this.props.context) { // context only available on server side
this.props.context.doLogout();
}
this.props.history.push('/newPath/');
}
2 - , , , :
componentWillMount() {
// you may have to this.props.history.push('/currentPath');
this.props.res.redirect(302, '/newPath/');
}
- ( , , ).