-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Make 0.13.x compatible with React 0.14 #2262
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
Conversation
The longer we maintain the 0.13.x branch the longer people are going to use it. If you want to volunteer to maintain it, we can merge this. But I don't want to. |
I mean, my goal is to immediately transition off of 0.13.x as soon as possible. I don't need this to be merged – I can just point npm to my fork for a short duration until I get on to 1.0. I'm sharing this PR because I think it could help people upgrade – now they can upgrade in stages, rather than all at once. We could agree that this is the last major change, slap a big deprecation notice on the 0.13.x README and call it a day. |
ok, gotcha. Remind me–did we commit our |
Sentry's pretty great. That said, apart from maintenance issues, I'm a little concerned about correctness here. Standalone What happens if you use React Router v0.13.4 with React v0.14.0? Does it completely fail, or do you just get deprecation warnings all over the place? |
On a complete tangent, because I don't know the meaning of the word off-topic, I noticed that you guys were pulling in all of React-Bootstrap (and other libraries) for your vendor bundle. Is there a benefit to doing things that way? Seems like you end up with a lot of stuff in your vendor bundle that you couldn't possibly be using. |
It fails because e.g. building after changing devDependencies to point to react 0.14.x
|
I'm new to the project (and webpack, mostly), so I don't have a good answer for this. But I don't think application filesize is a big concern for us at the moment. Upgrading react/react-router, is though :) |
@mjackson – I assumed so based off this. |
Ah, good point. That release was a bit of a mess :P I don't think I was supposed to check in the If you wouldn't mind just popping off the last commit that updates the |
@taion – re: Sentry and react-bootstrap, we can continue conversation on getsentry/sentry#2171. |
The React Router v0.13 release scripts run build as part of the release I think? I think given the choice between using React v0.13-style Otherwise, would it be possible to use a mini-library like https://www.npmjs.com/package/can-use-dom for |
Sure. I also considered just straight-up copying that function into the project – it's not going to change.
Also fine. |
I'm also in favor of this change BTW. I would have had an easier time of upgrading some of my projects if I could have separately upgraded React and React Router. Neither upgrade is particularly difficult, but nicer to be able to have smaller atomic changes for this sort of thing. |
Sorry, I misunderstood this. So, React 0.14 uses |
You break people still using React v0.13 though. It has to be one or the other. IMO the right approach here is to allow users to use v0.13.x with React v0.14 if absolutely needed, but then to encourage upgrading to 1.0.0 as quickly as possible, especially when using React v0.14. |
I think it'd be best to have a release that has some React v0.14 compatibility but maintains first-class support for React v0.13 in preference to React v0.14. The 1.0.0 API is different enough that I could see myself not wanting to make upgrading from v0.13.x to v1.0.0-rc{whatever} as a pre-requisite to upgrading to React v0.14. |
what about adding 0.14 support and saying "this is the last release for 0.13.x, update to 1.0"? |
Yup, and I think this PR does that - just quibbling over whether we should use |
So, I've made all the suggested changes and removed the built files / version bump. |
Awesome, thanks @benvinegar. I'll have some time to review this afternoon. |
looks great @benvinegar! |
This is looking pretty good. |
nm, I don't have time to review today. If anyone else does, please do and
|
I looked it over. Looks pretty good. Tests still pass under React v0.13.3. |
Make 0.13.x compatible with React 0.14
I guess we should release this as v0.13.5 at some point, then? |
Would love to use this to upgrade react to 0.14, fix any problems there, and then upgrade to react-router 1.0 without having to do both at once 😄 |
+1 on publishing a new version. |
@idolize @benvinegar created #2302, we should have the 0.13.5 release soon |
I work on a large React project, and upgrading our app to both react 0.14 and react-router 1.0.0 at the same time felt like a long, risky undertaking – especially with the huge, breaking API changes to react-router.
Instead, I decided to modify the 0.13.x branch of react-router to support react 0.14, mostly by just substituting calls to react's now-missing internal methods with the same libraries used by react-router 1.0 (e.g. "invariant", "history", and "warning").
I've tested this branch locally on my react 0.14 branch of Sentry, and it seems to work fine.