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
location.key in react-router-v4 #4336
Comments
This is already fixed in the v4 branch. |
Ah thank you @mjackson ! This is great news I'm really loving this. I am using ControlledBrowserRouter for Redux. How can I get the fixed version of v4, do I have to wait till gets a release on npm? I am currently using v4.0.0-alpha.6. So in my package.json it looks like this:
|
You can be cutting edge but depending on the repo directly, until a new release is cut. here is the syntax: git://github.com/user/project.git#commit-ish I believe for this project it would be: git://github.com/ReactTraining/react-router#v4 |
Thank you @kwelch ! Is there a scheduled release for alpha 7? The notes for alpha 6 say "do not use we have a huge update coming in the next couple of days". |
@kwelch may you please help me on how to install |
See #4358, installing from git is not supported. I was unaware additional steps were needed to allow for git dependencies and |
Oh dang thanks so very much for your fast replies! I am newbie to using non-UMD packages. Do you or @mjackson know when the release is for alpha7? The release notes for alpha6 said it was going to be a few days after the alpha6 release - https://github.com/ReactTraining/react-router/releases/tag/v4.0.0-alpha.6 |
@Noitidart The beta released today. Here are the docs. |
Oh my gosh such perfect timing haha! Thank you @kwelch for that note! |
I use the
location.key
in my child components.The key is by default 6 characters long. For instance doing
const history = createBrowserHistory()
, then history.location` it looks like this:However the
location
property received by children of<Match>
looks like this:In this
location
object we seestate
but its null, I expcted it to be value of thekey
. Does anyone know if react router v4 plans to get this? Or if there is a way to get it in the props? I know of course I can get this key by goingconst history = createBrowserHistory(); let cur_key = history.location.key
however this is may not match up with the props (due to animation timing etc), that's why I was hoping to get it from prop.The text was updated successfully, but these errors were encountered: