STRML / react-router-component

Declarative router component for React.
http://strml.viewdocs.io/react-router-component
MIT License
873 stars 94 forks source link

docs don't make it clear how to navigate programatically #202

Open mgenev opened 7 years ago

mgenev commented 7 years ago

It says to vaguely to pass a ref, but a ref of what? What object has the navigate method...

jsg2021 commented 6 years ago
<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)