Custom Native iOS Views with React Native
almostobsolete.net
almostobsolete.net
Also outside of Facebook Groups, which other apps are using React?
- Facebook comments, chat, search, ads creation, photo upload, tablet website... and basically every new product being written.
- Entire Instagram website
- Yahoo Mail: http://yahooeng.tumblr.com/post/101682875656/evolving-yahoo-...
- A lot of the Khan Academy front-end: http://khan.github.io/react-components/
- Netflix website and TV experiences: http://conf.reactjs.com/schedule.html#beyond-the-dom-how-net...
- Many Airbnb new products: http://www.slideshare.net/spikebrehm/the-evolution-of-airbnb...
- Flipboard mobile website: http://engineering.flipboard.com/2015/02/mobile-web/
- ...
https://itunes.apple.com/us/app/facebook-ads-manager/id96439...
Can browser-based react apps be converted to React Native apps with the click of a button?
* React Native has its own primitive components (Text or View) instead of primitives that map to standard HTML elements (span, div).
* React Native's runtime environment won't have all the browser APIs (DOM, navigation, web storage).
* React Native uses a subset of CSS and exposes it through the JS API instead of relying on the browser's styling (and separate CSS files).
That said, porting components is trivial. If you have a library of core components (Buttons, Menus, TabBars, etc.) then porting just those to the native implementation gets you most of the way there.
It's also possible to alias Text => span, View => div, etc. and use React Native's css-layout library on the web. But that won't help for legacy applications.
This isn't a hard and fast rule, just an acknowledgment that different platforms have different constraints and conventions. If you try and share all your code then you'll end up designing for the lowest common denominator, and your app will feel out of place.
In our next releases we'll be moving towards replicating many of the features of Native and API as well.
[0] http://reapp.io/