-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
documentation inaccurate for props.location #3540
Comments
I'm seeing that there was a PR (#3444) that adds The latest in npm is 2.4.1 and the documentation is very confusing and provides no path forward. It tells you to use context, and then when you do, it tells you not to use context. lol Should the documentation be updated telling people to use 3.0 alpha and check it out from github instead of npm? What's the best route forward? Another possibility is updating npm to have a version that includes #3444. |
|
Maybe I'm missing something. Not sure what you mean by the deprecated built-in one. There is no |
You are not correctly exporting |
According to the documentation if I want to access
props.location
it tells me I should add it to the context.When I do this it tells me:
But it doesn't have
props.location
. Which is the whole reason I added it to the context.I tried adding
withRouter
because the documentation states:But I don't see any way to get access to
location
from the router object andwithRouter
doesn't addprops.location
to the wrapped component.What is the recommended approach to accessing
location
when not a top level route component? This should be documented.The text was updated successfully, but these errors were encountered: