-
Notifications
You must be signed in to change notification settings - Fork 83
.navigate(href) is broken when called without a callback #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@JoshSGman Are you calling |
Published fix as 0.20.3, but please let me know re: above. |
@STRML Thanks! The way I did it was as I understood it to be specified in the docs on the site. I attached a ref to the Link, and then called this.refs.linkRef.navigate('/path') It looks like this ended up calling navigate on the Environment directly - with that said this was my understanding of how to route programmatically via the docs: "Alternatively, if you have a reference to a router component instance, you can call its .navigate(href) method to do a transition to a different location. You can acquire a reference to a router by using React's Refs mechanism." I wasn't looking to create an entire custom routing component. |
Ah. What I take that to mean is a Router component (Locations) - not a Link component, although it appears that both work. On Sep 16, 2014, at 10:38 AM, Joshua Goldberg [email protected] wrote:
|
In the documentation, it states that you can navigate programmatically using the .navigate method on a reference to the router component instance. Unfortunately, the source code requires a second argument to be passed in the form a function yet it doesn't state this anywhere. If you don't pass any additional arguments, the setPath method breaks as it expects a "navigation" argument to be an object:
The text was updated successfully, but these errors were encountered: