-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Couple of <Link> questions #2080
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
which version of React Router are you using? the 1.0.0-rc1 is not using named routes anymore so you would need to specify the path in your |
I'm using: https://github.com/thereactivestack/meteor-react-router/ which seems to require: Is there a reason named routes were removed? I ask because i use Django mainly at the moment which has a function `{% url 'namespace:name' %} which allows me to change paths without breaking my app. Granted paths are rarely changed it's still a nice little feature. So is the only way to link to Routes via a path? |
Have a look at #1840 there is a discussion about maybe bringing them back. And yes only via path. |
That answers the name question at least thank you :) I do like the Named Component method of doing that though and i could go down that route! Just a case of finding out how to use |
the other question - putting |
I thought that might break it as it looks similar to the code i have at home. When i get home today i'll post my code example and see if that makes more sense, thanks for your help :) |
👍 let me know, closing for now. |
Hey, just uploaded my repo :) The Component i was having trouble with was this one: https://github.com/DanGamble89/meteor-webpack-react-kickstart/blob/master/react/index.jsx#L26 That line throws me the error, |
@DanGamble89 are you still having issue with it? sorry I forgot to get back to you. |
@knowbody I haven't tried it again since i've uploaded it but i'm pretty sure that repo has the bug. I'll be trying it again this week so i'll post back in here with what i find again :) |
How would i use a
<Link>
in an component that doesn't seem to be the wrapping<App />
comoponent? I get this error:A <Link> should not be rendered outside the context of history; some features including real hrefs, active styling, and navigation will not function correctly
An example of when i would use this is like: https://github.com/rackt/react-router/blob/master/docs/Introduction.md#adding-more-ui and i would put a
<Link>
inside of the<Message>
component.Also are you able to
<Link toName='nameOfRoute'>
to link to a<Route>
regardless of it's path?The text was updated successfully, but these errors were encountered: