Live data from Hacker News

React Native at Instagram

engineering.instagram.com

71–80 of 238 posts

Re: React Native at Instagram

#71
post #27

Earlier quoted context omitted.

I'm working on a project where we are recreating a native app using React Native. We've found similar results; about 90% of our code is shared between both platforms. We also build both platforms every time, so both apps match really well. I'm not sold on React yet but this is a major plus to the platform.

That seems like a big plus for React Native. What are the negatives you have found?

To add to the good responses by the others, React Native development, on a good day, feels like the best of web dev and native dev (reload to see the change, `yarn add && react-native link` to add a new NPM package, run the app on devices while debugging with Chrome dev tool). On a bad day, it feels like the ultimate force unification from the worst of both worlds (nothing ever stays stable, ever; were you expecting the app reload to work every time? hah!; running the debugger makes the app crawl, even on recent devices; some packages require you to do lots of stuff for post-install configuration; upgrading RN version will fix some issues but you'll lose half day trying to resolve conflicts between RN and your code and RN and the dependent packages -- then you might get some issues that are unique to the new version of RN; CSS styling -- can cut both ways)

In my particular case, being a solo dev with web background, RN is the only sane option to make an app in Android and iOS in reasonable time.

I'd say it can be a good tech choice, if you plan to focus your work on platforms that React API and ecosystem touch (mobile and web, maybe not desktop).

EDIT: Some grammar cleanup and the bit about styling.

Re: React Native at Instagram

#72
post #59

They probably traded a really nice iOS codebase that had been maintained and improved upon for something that is going to end up with tons of special cases for when the UI is running on iOS/Android etc and make it incredibly difficult to test, reason about. Instead of improving the code on each respective platform, you end up with an inbred red-headed step child that shares the limitations and thorns of each, all smu…

So you haven't used RN then?

I have, and most of what is written there I find correct. Wouldn't go as far as the Flash stuff. Mostly, it's down to the terrible web ecosystem and JS. Feds love it, but they don't know better. Native developers do, and most of the ones I've worked with have suffered a mental toll on having to work with RN. Now, is it an understandable from a management standpoint? Sure, especially at a company like Facebook, where there is a lot of fed experience. Does that make it a good technology? Not at all. It's a terrible compromise that has only one purpose - allow feds to develop on mobile. If only cross-platform mobile development was a concern, something like Xamarin is a lot more technologically sound, but still a big compromise.

Re: React Native at Instagram

#73

The dirty little secret about React is that it tries to 'reinvent' the DOM tree, and Web Components will be out soon making it all obsolete. Why not just move to Web Components NOW, and not have to rewrite your view logic in 3 or 4 years. Polymer wins easily. React got a head start, sure, but the W3C standards and native browser support for WebComponents makes React redundant and unnecessary, in the very near future.

> Why not just move to Web Components…

This article is about React Native, not React.

Re: React Native at Instagram

#74

As an iOS developer, I had to decide between investing more time in Swift or React-Native. I chose React-Native simply because I thought it will allow me to broaden my mobile development experience and maybe one day stretch to even the Android platform. Furthermore, it improved my javascript skills in general and allowed me to create React web apps as well. I think it is the right choice thus far. Anyone else have si…

As someone who was in your shoes last year as I made a job transition into a lead developer role at a new company. I picked React Native for a small project over Swift: https://studio.carnegiemuseums.org/out-loud-cdc979453ef0#.rh.... It was worth it. Not only because immutable render functions make view code extremely pleasurable to write, but also because it's mostly JS and JSX it allowed me to quickly spin up a web developer to work on this project with me. (About 2-3 weeks.)

Now React Native is not without it's downsides though. You pretty much have to know the platform underneath if you want to do anything past API calls and rendering to a list view. (And even that list view does not support the heavy recycling that iOS manages for you.) For the above project I had to write our own Bluetooth, Audio and Accessibility Native Modules.

But the speed at which we were able to develop over a native solution was worth it alone. I highly suggest looking into React Native if your next project is simple enough.

Re: React Native at Instagram

#75
post #17

Earlier quoted context omitted.

Great article Martin. Do you have any performance figures or tips that you learned when porting the save feature? Specifically how was performance across Android/iOS?

Great question. First off, worth mentioning there are many performance metrics you might want to measure. On one hand start up times, but since you specifically mentioned Save, I assume you want to learn more about scroll perf (i.e.: dropped frames, memory usage, time to render next pages, etc). We don't have numbers we can share but but the React Native team is working on further improving this. Check out Spencer's…

To what extent is React Native performance on iOS limited by the fact that an iOS application using JavaScriptCore outside of a WKWebView can't use the JIT compiler, but only the interpreter?

Re: React Native at Instagram

#76
post #9

I opened Instagram the other day and saw a grey error message show up across the top of the app... it said something about a React error. I didn't get to read it well because it quickly disappeared. I thought I was tripping. Good to know I wasn't.

Same here. Something about a debug error.

That is the one thing that is difficult in React Native, getting rid of those debug errors. Sometimes they don't make enough sense to know what they are. But we google are way out of them. Sometimes they're related to a compatibility issues, and communication issues between Objective C and RN.

Re: React Native at Instagram

#77
post #59

Earlier quoted context omitted.

So you haven't used RN then?

I have, and most of what is written there I find correct. Wouldn't go as far as the Flash stuff. Mostly, it's down to the terrible web ecosystem and JS. Feds love it, but they don't know better. Native developers do, and most of the ones I've worked with have suffered a mental toll on having to work with RN. Now, is it an understandable from a management standpoint? Sure, especially at a company like Facebook, where…

Feds?

Dude, I've been developing on the iOS platform since 2011 and Android not much later than that. I've developed in Xamarin, and RN has a MUCH better development toolchain and dev experience.

I really don't understand the JS hate. I'm using typescript for RN development and I have had 0 problems so far. JS/TS dev velocity is just so much better than ObjC/Java. Swift is a huge step in the right direction.

Re: React Native at Instagram

#78

As an iOS developer, I had to decide between investing more time in Swift or React-Native. I chose React-Native simply because I thought it will allow me to broaden my mobile development experience and maybe one day stretch to even the Android platform. Furthermore, it improved my javascript skills in general and allowed me to create React web apps as well. I think it is the right choice thus far. Anyone else have si…

Yep. This describes me. I'm an iOS developer who has been contracting for the last 6 months doing nothing but React Native.

I do hope to return to Swift once the language stabilizes a bit more. It was annoying not being able to easily use any third party swift libraries when Xcode 8/iOS 10 came out (Apple made some Swift language changes and all third party libraries had to update).

All that being said, I'm pretty happy with React Native, its waaay better than any other cross platform solutions I have tried.

It was interesting going to the React Native developer meet up in SF. Very few native developers were present, pretty much everyone in attendance was a web dev.

I think being a native developer who is good at react native gives you a competitive advantage.

Re: React Native at Instagram

#79

As an iOS developer, I had to decide between investing more time in Swift or React-Native. I chose React-Native simply because I thought it will allow me to broaden my mobile development experience and maybe one day stretch to even the Android platform. Furthermore, it improved my javascript skills in general and allowed me to create React web apps as well. I think it is the right choice thus far. Anyone else have si…

As someone who was in your shoes last year as I made a job transition into a lead developer role at a new company. I picked React Native for a small project over Swift: https://studio.carnegiemuseums.org/out-loud-cdc979453ef0#.rh... . It was worth it. Not only because immutable render functions make view code extremely pleasurable to write, but also because it's mostly JS and JSX it allowed me to quickly spin up a we…

Can you share how big your team is and how many people were proficient in which languages? thanks!

Re: React Native at Instagram

#80

The dirty little secret about React is that it tries to 'reinvent' the DOM tree, and Web Components will be out soon making it all obsolete. Why not just move to Web Components NOW, and not have to rewrite your view logic in 3 or 4 years. Polymer wins easily. React got a head start, sure, but the W3C standards and native browser support for WebComponents makes React redundant and unnecessary, in the very near future.

> Why not just move to Web Components… This article is about React Native, not React.

React Native uses React. React is still in the core of it.
Post reply on HN