18 ms·
React Native is now open source
- kendallpark 12y agoHallelujah! I've been checking my Twitter obsessively today and yesterday for this.
- tav 12y agoI'vs been obsessively checking too, but for React Relay :(
- garindra 12y agoIt's the server-side GraphQL for me :(
- Rygu 12y agoSomeone wrote a GraphQL query parser. https://github.com/madjam002/graphqlite https://github.com/madjam002/graphqlite There aren't any GraphQL servers yet though. Pretty hard to write too in a generic useful-for-all manner.
- Rygu 12y agoWant to use out Relay ahead of the official release? See React Transmit: https://github.com/RickWong/react-transmit https://github.com/RickWong/react-transmit It's basically Relay but using Promises instead of GraphQL to write queries. Transmit is coincidentally also a very efficient way to create isomorphic apps that can render on the server.
- dabeeeenster 12y agoLooks like it's iOS only right now? Can't see any mention of Android in the docs?
- Fishkins 12y ago"We are also working on an Android implementation which we will release later"
- andybak 12y ago"Later" could be days or years! I'd love to hear even a very approximate ETA...
- itsbits 12y agoAs per this link https://code.facebook.com/posts/1014532261909640/react-native-bringing-modern-web-techniques-to-mobile/ https://code.facebook.com/posts/1014532261909640/react-nativ..., wait can be longer.
- timepiece 12y agoIt's taking them a long time since the announcement of the new framework at React conf. They said they would release an Android compatible version soon and still we're waiting for any updates beside the usual cliche.
- uptown 12y agoIt's been about a month since the world even knew React Native existed. You consider that a long time?
- timepiece 12y agoA month ago: 'We'll release an Android version later' A month later: 'We'll release an Android version later' You consider this progress at least in terms of PR & communications?
- untog 12y agoOf course it isn't progress. But nor is a month a particularly long time for progress to occur in.
- zellyn 12y agoThe first thing I do now on each Facebook open-source reveal, is to check the PATENTS file for the toxic second paragraph, to see if they've changed it. Sadly, no. I can't imagine being able to use this at any decent-sized company with lawyers. :-( https://github.com/facebook/react-native/blob/master/PATENTS https://github.com/facebook/react-native/blob/master/PATENTS See for example the discussions at https://news.ycombinator.com/item?id=9111849 https://news.ycombinator.com/item?id=9111849 (eg. https://news.ycombinator.com/item?id=9113515 https://news.ycombinator.com/item?id=9113515) Full disclosure: I work at Google, where many are sad to not be able to use recent Facebook code.
- kendallpark 12y agoWhat would you suggest as a solution to this? What should Facebook do?
- benologist 12y agoIt's a near-certainty that any tech giant is going to have patent issues with any other tech giant, not bundling the consequences of this with their open source licenses would be a good start.
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- andrea_sdl 12y agoI'm curious too. :)
- anfedorov 12y agoI am not a lawyer, but perhaps they could just skip the second paragraph? I understand the motivation behind discouraging people from suing you, but putting "you will not sue us for patent infringement" into a software license is a bit weird.
- arasmussen 12y agoWant to get your hands dirty writing iOS apps with React Native? Start here: http://facebook.github.io/react-native/docs/tutorial.html http://facebook.github.io/react-native/docs/tutorial.html
- CGamesPlay 12y agoReact Native is the most promising cross-platform UI toolkit I've thus far encountered. Congratulations to the team that built / launched it. The reason I'm excited for it: Java promised write-once-run-anywhere, which means you are always serving the least common denominator. React Native promises learn-once-write-anywhere, which means a single team of engineers can realistically build high-quality apps using the target platform's UI paradigms. Really exciting stuff!
- timepiece 12y agolearn-once-write-anywhere You're into commercials and marketing hype?
- duaneb 12y ago> React Native promises learn-once-write-anywhere, which means a single team of engineers can realistically build high-quality apps using the target platform's UI paradigms. Since when is react providing any semblance of stability? Javascript is already bad enough of a moving target without an unstable api on top of it.
- jakejake 12y agoI've heard the term "write once, test everywhere!" But, since testing is actually a good thing, I think the spirit of the quote is "write once, fix glitches everywhere" I am extremely hopeful about React. Even though I know Objective C and have apps in the app store, I'd use a cross-platform toolkit if I could get Android and Windows for free (or minimal effort). In my past experience it didn't really play out that way, but I am ever hopeful that this time it will really work.
- badlogic 12y agoWORA is pretty much a pipe dream, to different are the platforms and UI toolkits. One of the reasons why we heavily focus on enabling the same language(s) on multiple platforms while using the native UI toolkits with RoboVM. Funnily enough it's a different matter for games, see Unity, UE4, libGDX, Cocos2D-x etc.
- 12y ago
- lordbusiness 12y agoI'm very excited about this, but it's worth highlighting this from the FAQ: Q. Can I submit my own React Native app to the App Store? A. Not yet, but you will be able to soon. If you build something you want to submit to the App Store, come talk to us ASAP.
- spicyj 12y agoOops, this was left over from our private beta. Removed now!
- lordbusiness 12y agoOk now I'm even more excited! Thanks! :-D
- spicyj 12y agohttp://facebook.github.io/react-native/ http://facebook.github.io/react-native/ or https://code.facebook.com/posts/1014532261909640/react-native-bringing-modern-web-techniques-to-mobile/ https://code.facebook.com/posts/1014532261909640/react-nativ... would probably be a better link here.
- lucidrains 12y agoI know what I'm doing this weekend!
- kendallpark 12y agoMe too! Got a four-hour car ride to Kentucky. Hopefully I won't be driving.
- cozuya 12y agoFlappyReact?
- masterj 12y ago2048 - React
- evv 12y agoI think we beat you to it: https://github.com/facebook/react-native/tree/master/Examples/2048 https://github.com/facebook/react-native/tree/master/Example...
- jondot 12y agoTry this https://github.com/facebook/react-native/tree/master/Examples/2048 https://github.com/facebook/react-native/tree/master/Example...
- revskill 12y agoHow can i use Sqlite with react native?
- evv 12y agoThere is currently no native module for SQLite, but you can build one if you want. :-D http://facebook.github.io/react-native/docs/nativemodulesios.html http://facebook.github.io/react-native/docs/nativemodulesios... We use a key-value store for most of our client-side persistence: http://facebook.github.io/react-native/docs/asyncstorage.html http://facebook.github.io/react-native/docs/asyncstorage.htm...
- almost 12y agoI've built a basic wrapper for SQLite for React Native: https://github.com/almost/react-native-sqlite https://github.com/almost/react-native-sqlite
- kendallpark 12y agoWhat data storage options are supported, if not SQLite?
- findjashua 12y agowell, there goes my weekend
- cozuya 12y agoIs this node/ES5 only or can we use io?
- spicyj 12y agoYour apps run in JavaScriptCore (like Mobile Safari) on device, but our packager includes a transpiler set up so that you can use most ES6 features already.
- fredliu 12y agoGreat news! One question: since FB just announced React+Parse, I wonder how's support for Parse in React Native? Or put it a better way, if I want to write an multi-platform app based on Parse, should I consider using React Native? or it's still better to developer separate apps for each platform to get the best of Parse (especially for features like push notification)?
- vjeux 12y agoYou can `npm install parse` and run it as usual within a React Native app
- fredliu 12y agoGreat! I guess it wouldn't be a problem for common operations like data creation and fetching, since underneath it's all implemented through REST APIs. But what about push notification? Parse's JS library doesn't support it, but its iOS library does support it through platform's push notification mechanism. Does this mean using Parse in React Native, I can't get Push Notification to work on iOS? or I still have to write native iOS apps to get push?
- evv 12y agoWe built the F8 app with parse, including push notifications Take a look here: http://facebook.github.io/react-native/docs/pushnotificationios.html http://facebook.github.io/react-native/docs/pushnotification...
- fredliu 12y agoSuper! Hopefully React Native + Parse will become my "one ring to rule them all" for app development.
- HaloZero 12y agoI'm curious, can somebody talk about the differences between using React Native vs ComponentsKit? It seems ComponentsKit is a very specific to iOS as opposed to React. https://github.com/facebook/componentkit https://github.com/facebook/componentkit
- bkurtz13 12y agoWith React Native you write your apps in JavaScript, in a React.js style. My understanding is that ComponentsKit has you write your iOS apps with ObjC/Swift or whatever, but it gives you a way of structuring your apps that is similar to React.js
- solarexplorer 12y agoComponentsKit is Objective-C++ only (no Swift).
- clay_to_n 12y agoI think they've said they are working on a Swift port (at the end of that F8 video talking about it).
- solarexplorer 12y agoYes. I think it will be worth the time to rethink it for Swift, because Swift is much better suited for this style of programming than Objective-C++.
- randartie 12y agoWhat it sounds like is that your data-flow will be react-app-like (flux).
- shaohua 12y agoAll the SF people, want to meet up casually on this new shinning toy? http://www.meetup.com/SF-React-Native-Meetup/ http://www.meetup.com/SF-React-Native-Meetup/
- M8 12y ago"...Native ... based on JavaScript..." - facepalm.
- freyr 12y agoShould someone learning iOS development stick to vanilla iOS while learning, or would it be feasible to use React Native from the outset? I already have some React experience, and I have some React-based web app that I'd like to turn into native iOS app.
- joslin01 12y agoIf you're learning iOS development, stick to learning iOS development. A framework, no matter how cool and neat it is, will not replace pure iOS development for serious apps. Also ask yourself a question, do you really think you can call yourself an iOS developer when the only way you truly know how to create apps is with React?
- arasmussen 12y ago> for serious apps Like Facebook's Groups app and Ads Manager app, which both use React Native?
- T-A 12y agoCross-platform, as long as it's iOS? ;)
- itsbits 12y agocan we use Babel over the top of it?
- aikah 12y agoIs babel compatible with JSX ?
- funkiee 12y agoIf you can create a build process that outputs it's starting point to index.ios.js, I don't see why not.
- amasad 12y agoNothing should stop you from doing it (if you can navigate your way around the codebase). However, we want to make it easy for you to use your favorite tools. Read more about how the packager currently works https://github.com/facebook/react-native/blob/master/packager/README.md https://github.com/facebook/react-native/blob/master/package...
- aikah 12y agoSo is the UI 100% core Ios or does some widgets live in a Webview ie html widgets ?
- jonhester 12y agoNo webview.
- amelius 12y agoDoes it support android as well?
- jakejake 12y agoIncredible on iOS. Android support... coming soon! This seems to be the case with a lot of cross-platform development kits. One or the other of the platforms is a second-class citizen. It seems that all of us are salivating at the idea of having true cross-platform tools that actually work really well on all environments so I will keep my fingers crossed that Facebook can pull it off.
- augustl 12y agoFWIW it won't be cross platform, it will be a separate implementation for Android. The goal is the model, not the write once pipe dream.
- ossreality 12y agoer, what
- jakejake 12y agoLooking at the name of the UI components, that definitely seems to be true, as a lot of them have "ios" appended to the class name. But, even if you're writing Objective C, you might have different storyboards for the phone vs the iPad. so I don't think it's unreasonable to have different views for the different devices. My concern is that it actually works and isn't buggy as hell on one of the platforms, which is something that I haven't found from similar toolkits.
- felipesabino 12y agoTrue, but if you can write once at least the business logic, is is already a win
- robertfw 12y agoI am also wondering how much scope there is for writing generic interfaces that delegate to UI specific components as needed. I haven't done any native mobile development before so I'm not sure how possible this will end up being, but seems plausible.
- 12y ago
- thedangler 12y agoWill It support OS X Applications as well?
- nacs 12y agoThey've stated in the past that they're focusing on iOS then Android first but that the system could be used on other platforms like Windows/Mac/Linux.
- renaudg 12y agoDevOps guy here, new to both JS and iOS, forgive the naive questions : What proportion of iOS UI elements are available through React Native ? Is there a 1:1 mapping somehow, but how are discrepancies between platforms (Web/iOS/Android) handled then ? Could a complex app's views realistically be built entirely using this or would you have to resort to native UI elements in some cases ? How well would they mix with React Native code ?
- GVRV 12y agoComponents are listed at http://facebook.github.io/react-native/docs/getting-started.html#content http://facebook.github.io/react-native/docs/getting-started....
- brokencode 12y agoDoes anyone else really want to see a version of Elm that compiles to React Native? Since Javascript is the de facto intermediate language of the 21st century, frameworks like React Native open a lot of doors.
- spion 12y agoIf you can't wait for it, you could use PureScript and fork Thermite [1] to add react-native support :) [1] https://github.com/paf31/purescript-thermite/ https://github.com/paf31/purescript-thermite/
- aravan 12y agoBut why React Native? Reactjs for web makes sense as browsers struggle with DOM manipulation. Native apps rendering capacity is sub-micro seconds. Hoping for Appcelerator's dreaming Hyperloop that give us native JS capabilities. I still plan to use ReactJs (web) within web-view.
- tootie 12y agoFills the same niche as Cordova/PhoneGap or Xamarin. It's kinda the best of both. Intuitive dev process for web developers not needing to learn new paradigms. Fully native compilation for better performance than WebViews.
- badlogic 12y agoAre you sure they compile to native? IIUC they use JavaScriptCore on iOS, which currently doesn't JIT. Probably good enough to drive UI and you can implement performance hungry stuff in native code.
- tootie 12y agoNot sure, but it's native UI at least. The demos they showed prior to release were far more responsive than any WebView based solution.
- mwcampbell 12y agoIs React Native for iOS able to take advantage of JavaScriptCore's JIT compiler on any version of iOS? Or can it only use the interpreter? If the latter, I wonder if the React Native developers have considered using Duktape rather than JavaScriptCore. Duktape might be better for memory usage, since it uses reference counting, with mark-and-sweep GC only being necessary to break cycles.
- evv 12y agoDuktape looks quite nice! Because we built React Native around an asynchronous batched bridge, we can plug it into any JS execution environment. For now we plug it into JSC, which is available on iOS 7 and 8. We also use websockets to execute the JS in chrome so we can utilize the debugger. Without much difficulty, we can make the bridge work over a WebView (if we want to support older iOS versions), or Duktape.
- mempko 12y agoHow does this compare to Qt project QtQuick, which supports far more platforms then react native. Both use javascript and both are reactive programming systems...
- bananaoomarang 12y agoIt's personal preference, but I prefer React ATM.
- sheraz 12y agoCool to see this. By my count we now have, in no particular order: - React Native from Facebook (https://github.com/facebook/react-native https://github.com/facebook/react-native) - Appcelerator's Titanium and Alloy Frameworks (http://appcelerator.com http://appcelerator.com) - Telerik's Native Script (http://telerik.com/nativescript http://telerik.com/nativescript) - Xamarin (http://xamarin.com http://xamarin.com) As I understand it, all three of these frameworks have a JS (or C#) runtime that is compiled along with the app. This JS runtime is what drives the app and uses the native features of each platform (iOS / Android). I've been building on Appcelerator for the last 4 months on some basic apps, and it works pretty well. I look forward to trying out some toy apps on the other platforms.
- emmanueloga_ 12y agoDon't forget http://robovm.com/ http://robovm.com/ (basically java for ios).
- badlogic 12y agoThanks for remembering and mentioning us. We don't have as huge a marketing budget as the other folks, so I'm going to shamelessly piggy back on your comment here. We also do Scala, Kotlin, Clojure etc. and we are OSS as well (we started out as OSS). You can build unlimited apps without paying us a dime. You can also compile the entire compiler plus Eclipse/Idea/Maven/Gradle integration yourself so you aren't locked in. We expose all iOS APIs and have a custom bridge besides JNI to make binding and subclassing of Objective-C APIs and C APIs as seamless as JNA or p/invoke, but without performance overhead. We use LLVM to compile JVM bytecode to native code directly, so performance is excellent and on par with Objective-C. At this point you can write apps for iOS and Android, using the native UI APIs, and share business logic between them and your backend, if that's also JVM based. I personally think that using native UI APIs is best. However, for CRUD or enterprise apps you may not care about shininess, which is why our next focus will be on a cross-platform UI toolkit for Android and iOS. You do have to pay for debugging support, interface builder integration and SLAs/hotfixing. We hope that's a fair way of supporting our OSS work. Now I feel dirty...
- garindra 12y agoA little typo on the code example on the ListView docs page (https://facebook.github.io/react-native/docs/listview.html#content https://facebook.github.io/react-native/docs/listview.html#c...): new ListViewDataSource should have been: new ListView.DataSource
- curiously 12y agoomg...I'm so excited still wish there was a way to develop for iOS on windows platform but I guess I will have to purchase a mac now if I want to build mobile apps
- samirageb 12y agoUm, Xamarin?
- oyvindkinsey 12y agoWith RN, you really only need XCode to build the initial app and the final build for submission - everything in between can be done on any platform that can run the packager with a phone for actual testing. So if you have a friend with a mac, you're good!
- DigitalSea 12y agoRemember this day, because React Native is going to be a game changer (patent clause stuff aside). Others like Phone Gap tried to make it so you could build native apps using HTML/Javascript but they failed because they focused on running said HTML/Javascript within a performance limited WebView and not the other way around. This weekend I am going to try and get a working application built using React Native. Facebook are absolutely killing it in regards to their open source contributions. The learn once, write anywhere paradigm is smart as opposed to what others have done via their write once, deploy anywhere approach which just doesn't work for web and native applications.
- WalterGR 12y ago> they focused on running said HTML/Javascript within a performance limited WebView and not the other way around. Could you explain that? I'm not familiar with phone development and I'm having difficulty figuring out what "the other way around" is.
- dcre 12y agoWith React Native, instead of writing HTML/CSS and running it on a crappy browser embedded in an app, you write code that looks like HTML/CSS (it's actually JSX)[1][2] and it is translated to native code. [1] https://facebook.github.io/react/docs/displaying-data.html https://facebook.github.io/react/docs/displaying-data.html [2] https://facebook.github.io/react/docs/jsx-in-depth.html https://facebook.github.io/react/docs/jsx-in-depth.html
- oyvindkinsey 12y agoIt's not translated. The JS runs to create a declarative description of what the ui should look like, which is reduced to a diff representing the changes that needs to be made to the native ui. These change commands are then marshalled to native code which simply implements the changes (add this thing, move this thing, remove this thing).
- 12y ago
- nashashmi 12y agoThis does not make sense to me: var { ScrollView, TouchableHighlight, Text } = React; It gives an error in Console.
- funksta 12y agoThis is destructuring (a new feature in ES6, the upcoming version of JavaScript). There's a great in-depth read on how it works here: http://www.2ality.com/2015/01/es6-destructuring.html http://www.2ality.com/2015/01/es6-destructuring.html
- blazespin 12y agoIsn't this just appcelerator? Except appcelerator has android support and has been around for longer.
- thoman23 12y agoI am excited for the possibility of "Scala Everywhere". Scala -> Scala.JS -> React Javascript -> Native code I'll have to try this out on a small project and write about it.
- chubs 12y agoHi, technical question from a long-time iOS developer here, i hope you can put my concerns at ease: How, when you're running JS on a different thread to the iOS main thread, do you avoid race conditions? A simple example: * Say a button's event handler pushes a new view controller onto the navigation stack, what's to stop the user from tapping the button twice very quickly before the JS thread gets a chance to service the first tap, eg it may be garbage collecting or busy elsewhere, and once it's free again it runs the handler twice and pushes two view controllers onto the navigation stack? Looks great by the way, i'll certainly check it out.
- itsbits 12y agoAny one did code through of this? Would love to know some highlights
- itsbits 12y agoHow can we manage the Asynchronous parts like Ajax for example?..
- ransom1538 12y agoPlease see this image: http://facebook.github.io/react-native/img/chrome_breakpoint.png http://facebook.github.io/react-native/img/chrome_breakpoint... I am really confused. Why is this easier - this looks extremely buggy and complex?
- woah 12y agoLooks like the chrome debugger. I just built a react native app, and for the basic Ajax + list view, it is far easier than the usual drag'n'drop/imperative iOS we are used to.
- Uroboric 12y agoI'm interested in this primarily because I don't find it appealing to invest in (basically non-transferable) iOS platform skills. I want to build native mobile UIs for my projects, but not with a dead-end language and tools.
- itsbits 12y agoI am seeing something like this in Native code var { AppRegistry, Image, ListView, StyleSheet, Text, View, } = React; is this ES6 feature?
- billybolero 12y agoYes, that's an ES2015 (formerly known as ES6) feature called destructuring. It's just one of the great features of ES2015. You can use ES6 today by transpiling to ES5 with https://babeljs.io https://babeljs.io
- grego 12y agoAfter figuring out how to deploy to device (see AppDelegate.m), I tested accessibility and it seems there is virtually none. At least in the Movies example app, VoiceOver reads practically nothing. How would one go about making the Movies sample accessible, or is that even possible?
- PSeitz 12y agoCan someone point me to the added value by react native? Why so much hype? I just don't see it.
- levosmetalo 12y agoNow waiting for the React-Native for the Android :)
- auston 12y agoWhere is @grellas when you need him most?