9 ms·
We're really excited about this release. I also wrote about how we made the rewrite happen on our Facebook engineering blog: https://news.ycombinator.com/item?i
by spicyj 9y ago
We're really excited about this release. I also wrote about how we made the rewrite happen on our Facebook engineering blog: https://news.ycombinator.com/item?id=15339825 https://news.ycombinator.com/item?id=15339825.
Happy to answer questions if y'all have any. :)
- outside1234 9y agoAre there plans to relicense React Native to MIT without a Patent timebomb as well?
- tomkinson 9y agoMy understanding this was already done last week. I could be wrong. GraphQL however, not yet.
- vvanders 9y agoNot React Native, that still has the patent clause.
- yasserkaddour 9y agoGraphQL specification has been relicensed minutes ago to Open Web Foundation Agreement, graphql-js and relay to MIT. https://medium.com/@leeb/relicensing-the-graphql-specification-e7d07a52301b https://medium.com/@leeb/relicensing-the-graphql-specificati... https://news.ycombinator.com/item?id=15340528 https://news.ycombinator.com/item?id=15340528
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- Dolores12 9y ago[edited]
- seattle_spring 9y agoReact !== React Native
- jonknee 9y agoWell, react-dom !== react-native. Both projects use core react.
- ofirg 9y agoHowever React == React Native evals as true due to type conversion (in ECMAScript projects with or without a patent grant are both considered 'truthy'). Really even === is not good enough, The only reliably why to test for it right now is to put a patent claim against FB inside a try-catch. * I am not a lawyer and this should not be taken as legal advice.
- Godel_unicode 9y agoHere's the problem with that type of snark; when you're wrong it's really bad for you. You are responding to a question about react NATIVE, which still has the patent grenade (see below). https://github.com/facebook/react-native/blob/master/PATENTS https://github.com/facebook/react-native/blob/master/PATENTS
- deleted 9y ago[deleted]
- ec109685 9y agoWhat patents does react native utilize of facebook’s?
- Godel_unicode 9y agoNot sure, but that's not relevant to the patent grenade. It revokes your license if you're involved in ANY patent action against Facebook, regardless of that patent being used in RN or not.
- danabramov 9y agoIt's possible in the future, but re-licensing React itself was already a very large change, and it will take more time to review the possibility of this for other projects like RN. Thanks for your patience!
- moomin 9y agoYeah, pity said large change was implemented before checking if it was a good idea. Community: This license is a legal nightmare. Something needs doing! Facebook: We have done something. Community: Try listening to both sentences next time.
- rhencke 9y agoThe MIT license is extremely commonplace in web libraries and is well accepted. (used by jQuery, Preact, Angular, etc.) Can you clarify your concerns?
- slaymaker1907 9y agoI'm not in anyway connected with FB, but I think the reason why React was licensed under MIT more quickly than React Native is because of that licensing environment. Web frameworks traditionally have very open licenses, but native seems more more restricted such as with Qt and the C# thing I don't remember the name of.
- bennyg 9y agoExcept the largest 3rd party Objective-C and Java (Android) libraries are usually MIT as well. I don't really think this has to do with traditions as far as per platform licensing goes.
- bernadus_edwin 9y agoC# things : xamarin & mono
- swah 9y agoBut now they "have" to relicense React Native, right? Otherwise someone will write a React Native clone starting from MIT-licensed React, no?
- andrewingram 9y agoI suppose they might, and good luck to them. React Native is a monstrously complex beast in comparison to React. Ultimately the React ecosystem would benefit from the attempt.
- mihular 9y agoBut does MIT license really solve all patent issues? FB could still enforce patents regardless of license if I understood it properly.
- signal11 9y agoIANAL, but is it fair to say that using React under MIT doesn't leave you any worse off than using Angular and Vue? (both of which are MIT-licensed) Depending on the patent in question, it is possible to be on the hook even if you don't use React.
- mihular 9y agoBut do the others have explicit patents?
- pritambaral 9y agoDoes React?
- mihular 9y agoI don't know. But Facebook owns around 5200 patents. Add the previous patent clause to it and you have a good probability that there are patents covering parts of react. VirtualDOM is certainly a candidate.
- mlsarecmg 9y agoEveryone can, that's precisely why they gave you a grant previously. Now that it's gone due to the outcry it's in the same, vague playing field that all other libraries are in. Every project you have ever written infringes on someones IP. The only thing that matters is that lawyers that previously got cold feet can now relax. We had a project for instance that was canceled, now it's being green-lit thanks to the MIT license.
- TimTheTinker 9y ago
- bcherny 9y agoThanks for the hard work! This release looks really exciting and I can't wait to try it out. Out of curiosity, did you switch to Rollup for the tree shaking optimizer, or for some other reason?
- danabramov 9y agoWe used it because it produces a single flat bundle without extra module boundaries. I think webpack 3 might do the same with the experimental concatenation plugin, but we're fairly happy with Rollup.
- bcherny 9y agoI see, and the benefit there is faster startup due to less IIFEs?
- danabramov 9y agoYes. It's also nice that we don't expose the internals anymore, even when consumed via CommonJS.
- sAbakumoff 9y agoThat's truly hard work to rewrite everything from scratch and keep the legacy API untouched! OOC - what was the most difficult feature/bug to preserve/fix in this process?
- zitterbewegung 9y agoWill the new performance improvements also trickle down to react-native and or react-vr ?
- danabramov 9y agoYes.
- k__ 9y agoSince RN is using 16 for a while now, they already did, or am I wrong?
- danabramov 9y agoThe "react" package is mostly irrelevant here since it only contains a few utilities. The actual reconciler is synced separately, and no, it isn't enabled in RN yet (but maybe will be in the next stable release).
- spicyj 9y agoIf I'm not mistaken, https://github.com/facebook/react-native/commit/b58207e61fcb3fb0444860ba11b8a62aff7836c9 https://github.com/facebook/react-native/commit/b58207e61fcb... enables the new implementation in RN. So it'll be in React Native 0.49.
- aurnik 9y agoDo RN projects just need to upgrade React then?
- danabramov 9y agoNo. We'll update RN with the new reconciler in the next few versions. Don't expect it to magically improve performance though. But the async stuff mentioned in the post will definitely come to RN when it is ready.
- deleted 9y ago[deleted]
- koolba 9y agoKudos on both the release and the licensing changes. Why remove the dist folder that was in prior releases?
- spicyj 9y agoIt's been renamed to "umd" for clarity.
- deleted 9y ago[deleted]
- dean 9y agoThe conventional wisdom in software development is to never rewrite your application from scratch. Typically it's much more difficult than you thought it would be, and it takes too long. Meanwhile, competitors pass you by (remember Netscape?). Just wondering how you came to make the decision to do this, and what, if any, concerns came up along the way?
- brokencode 9y agoThe conventional wisdom applies to large, complicated software. The source for React comes in at around 109kb now. That couldn't be more than 10-20 thousand lines of code, which is quite small.
- dahart 9y agoThe blog post mentioned getting test coverage before starting: https://code.facebook.com/posts/1716776591680069/react-16-a-look-inside-an-api-compatible-rewrite-of-our-frontend-ui-library/?utm_source=codedot_rss_feed&utm_medium=rss&utm_campaign=RSS+Feed https://code.facebook.com/posts/1716776591680069/react-16-a-... I always remember how the SQLite author Richard Hipp talked about being able to rewrite major chunks of the SQLite engine due to their test coverage. Their testing page currently says they have 730x more test code than core library code. https://www.sqlite.org/testing.html https://www.sqlite.org/testing.html
- dfabulich 9y agoWill it ever be possible to slim down React to the size of Inferno or Preact? Would it be enough to make the synthetic event system optional?
- danabramov 9y agoWe'll be looking into simplifying the event system in the future.
- codelike 9y agoI've just finished reading https://code.facebook.com/posts/1716776591680069/react-16-a-look-inside-an-api-compatible-rewrite-of-our-frontend-ui-library/ https://code.facebook.com/posts/1716776591680069/react-16-a-... and it provided lots of good insights into how you managed to roll out the new release. Thanks for the interesting write-up! That blog post mentions your featureFlag approach, the initial dogfooding and then the gradual rollout. I'd be very interested to hear on top of that: 1. How did you approach the rewrite on the coding side? What I mean is: Did you just say "Okay, let's start from scratch and use the lessons learned from v1?" Or did you use a specific approach along along the lines of: "Let's structure our code based on these principles and ...?" 2. When you started the rewrite, how did you know in advance and make sure that the rewrite would be faster and have a smaller code-size? 3. Was your focus during the rewrite on a cleaner code base (and the performance improvements followed automatically) or was your focus on speed right from the start? 4. Any other lessons learned during the rewrite? Patterns and approaches that helped/didn't help during the coding?
- fiokoden 9y agoJavaScript library update without massive shameless breaking changes. Weird. It's just not the way things are done in the JavaScript world.