react-router-component
react-router-component copied to clipboard
docs don't make it clear how to navigate programatically
It says to vaguely to pass a ref, but a ref of what? What object has the navigate method...
<Locations ref={x => this.router = x}>...</Locations>
else where:
this.router.navigate('/path/to/route', {replace: true}); //the second arg is optional. the replace key will signal the use of replaceState or pushState (default)