-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Support React version 0.13 #638
Comments
Ooo ... exciting! I need to find some time to look into this. @gaearon Do you know when they anticipate a release? |
Usually betas come in a week or two before the release, but I don't know for certain, and this one is explicitly work in progress as stated by @zpao. The good thing is, following React's deprecation policy, everything still works (but spits out a lot of warnings). There also seems to be a bug in warnings themselves: instead of being printed once, they seem to be printed for every child (which explains why there's such a load of them). |
Early next year. Hopefully around the conf, but I refuse to make promises :) I think 0.13 won't actually have parent context as the default and it might not actually be exposed at all except via the warning. Since we really don't know how people are making use of context in the wild, I'm not sure if we can just go (maybe) break them, even if we never promised support. But we can help with the transition for when we know it would break, thus the warning. |
HEY EVERYONE @zpao SAID THAT REACT 0.13 IS GONNA BE RELEASED IN JANUARY |
I can has 0.13 support? 😄 Out here on the bleeding edge! |
Just did some testing and here's the issues I've found thus far:
|
Just FYI, I'm working on 0.13 support in the 0.13-compat branch |
Timing couldn't be better :) http://facebook.github.io/react/blog/2015/02/24/react-v0.13-rc1.html |
@mjackson Thanks for the compat branch. I'm having some issues there. The initial/default route works fine, but when I try to change to another route through the URL, I'm getting:
And nothing else happens. I'm pretty new to React and react-router, but if anyone could give me some pointers, I'd like to take a crack at it. |
My experience so far in trying to make rack/react-router#0.13-compat work with react@0.13.0-rc2 :
entering the folder and running
I found the bug, my problem was with the PureRenderMixin… |
There's a build step to do this, happens before publishing to NPM. |
Oh, I see it, https://github.com/rackt/react-router/blob/master/package.json#L14, |
I get some :
|
Which doesn't seem a problem, however when opening a new tab and hitting a route, I get :
but when refreshing the page it goes right. |
v0.13 has just been released: http://facebook.github.io/react/blog/2015/03/10/react-v0.13.html |
@chollier That actually seems weird to me, because Just tried to run the test of the compat branch with react 0.13 - tons of errors. Not sure where to start fixing them. Tried to add @ryanflorence @mjackson any pointers where exactly help is required and what currently is already being worked on to fix the compat issues? |
Should we work based on the compat branch? |
I noticed in this branch that the 0.13 class syntax is being used. Does this mean that the Edit: This is really more a question of how to address the 0.13 issues, rather than maintaining backwards compatability |
Router can still be used both in new and old style components. This is not changing. |
@gaearon Yes, but this branch defines the Route components with the 0.13 class syntax. Unless I am mistaken, this eliminates 0.12 support. |
Oh, sorry, I misunderstood your question. When React bumps major version, next version of RR comes out requiring it. So yes, React Router 0.13 won't support React 0.12, as far as I know. |
@gaearon 👍 That'll make the |
I think I fixed 0.13, but I don't really know yet. Would anyone be willing to verify my 0.13.0 branch? |
Related: #948 |
@johanneslumpe nevermind I also get that with 0.12 |
I created a PR to fix the owner vs parent context here : #959 |
I'm just curious because it's been about a month since React v0.13 was released and almost half a year since this issue was originally created... Is anyone actually working on this or are we all just waiting for someone else to take on this challenge and solve the problem? |
@pilwon I'm pretty sure that this already supports React 0.13, I'm not sure why it's still open... Following the upgrade guide made it pretty easy to make the changes necessary for React 0.13. |
The issue hasn't been updated, but the latest version supports react 0.13.
|
That is a fantastic news. Thanks guys 😁👍 |
This has been fixed a while ago actually, tested with react 13.1, and it's pretty great to say the least. |
The warnings introduced with the 0.12->0.13 upgrade still appear, so until that is sorted out, I cannot see how you can say that this issue has been fixed, @thealjey and @woodb
Do agree that it is functionally working, though. |
@fatso83 have you gone through the migration guide? We're using |
@woodb Yeah, as it's public, you can see that I follow the upgrade guide pretty close. Not really doing any fanciness (no Mixins), just basic route setup, one sub-level using RouteHandler and router.run(). So not sure why I get these warnings. I am not seeing any warnings when |
@fatso83 In dev mode you are using your build/jslib/react-router.js file. I don't believe that's react-router 0.13.2, since replacing that with the actual react-router 0.13.2 gets rid of the warnings for me. |
@deakster Thanks for checking that. Issues gone. I'll gladly shut up and never utter a word on GH again... No clue what version of react-router that was either. Maybe that could be a clue to add the version info at build time like React does? Think I'll go hide under a rock for a few weeks now. |
@gaearon should this be closed then? |
Yep. |
React 0.13 brings parent-based context instead of owner-based context.
I'm getting tons of warnings with just published react@0.13.0-alpha.1 and the main problem seems to be that context is defined on router (
makePath
,makeHref
,transitionTo
,replaceWith
, etc) but we're givingRouteHandler
in render, so these keys don't appear inRouteHandler
's parent-based context.I still can't think quite straight about these changes but I assume some kind of wrapping
RouteHandler
into context parent will be necessary.Edit (@mjackson): let's keep a checklist here:
Router
into a proper class instead of the hybrid it is todaycreateClass().type
(thanks @taurose)router
on context (see Too much stuff oncontext
#744 / Update doc for Navigation api , goback method. Following up on #408 #855)The text was updated successfully, but these errors were encountered: