I couldn\'t wait and I jumped into using the latest alpha version of react-router v4. The all-new is great in keeping your U
I found using state, a ternary operator and worked best. I think this is also the prefered way since it is closest to the way v4 is set up.
In the constructor()
this.state = {
redirectTo: null
}
this.clickhandler = this.clickhandler.bind(this);
In the render()
render(){
return (
{ this.state.redirectTo ?
:
(
..
..
)
}
In the clickhandler()
this.setState({ redirectTo: '/path/some/where' });
Hope it helps. Let me know.