Live data from Hacker News

React Native at Instagram

engineering.instagram.com

41–50 of 238 posts

Re: React Native at Instagram

#41
post #16

This is huge. 87-99% shared code between iOS and Android. Someday companies as big as Instagram won't need to have entire separate product teams for separate platforms. > React Native allowed product teams to ship features faster to both our iOS and Android apps. The list below shows the percentage of code shared between the apps for some of the products, which could be used as a proxy to measure how we managed to im…

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.

Are you not sold on React, or React Native? If you're talking React for Web, we're in a similar boat, where we want to use React Native for mobile, but for our larger website app, something else....

Re: React Native at Instagram

#44
post #16

This is huge. 87-99% shared code between iOS and Android. Someday companies as big as Instagram won't need to have entire separate product teams for separate platforms. > React Native allowed product teams to ship features faster to both our iOS and Android apps. The list below shows the percentage of code shared between the apps for some of the products, which could be used as a proxy to measure how we managed to im…

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.

Yep, I can confirm the same. I've shipped two reasonably complex react native apps, both were about 80-90% shared code.

Areas where we diverged were things like permissions on Android versus iOS, code that has to run in the background while the app is not foregrounded, material design stuff.

Re: React Native at Instagram

#45
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?

I was at the SF React Native developers meet up the other night, the speaker (Devin Abbott) gave several nice pro/con's slide re react native. Here's a picture of the slides:

http://imgur.com/a/T3O7i http://imgur.com/a/z2oIU

Re: React Native at Instagram

#46

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…

I've had a similar experience. I have had to spend time learning both, I think I am just paranoid about job security! Moving from Objective-C to Swift felt a lot more natural than moving to React Native, getting used to Javascript and the web development environment in general is quite daunting. What were your deciding factors when making your decision?

Re: React Native at Instagram

#47
post #29
post #6

I didn't know what single/multi-dex means so i looked it up. Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536, including Android framework methods, library methods, and metho…

Almost every Android app that includes the most common dependencies (Android support lib, Google Play services, etc) will end up being multi-dex. This used to be a massive pain but lately the Android Studio / gradle multidex tooling has gotten so good that I don't notice anymore.

You still incur a startup penalty with multi-dex, it takes noticeably longer than a single dex, even if you are only marginally into that 2nd dex.

Re: React Native at Instagram

#48

@martinbigio here in case anyone has questions

Probably OT but a bug that's been driving me crazy for a while now. When I open Instagram it reloads the feed every time as if the app had been purged from memory. This means if I accidentally close the app and reopen it my scroll position is lost and thanks to the sort algorithm the feed order has changed and I can't get back to where I was.

See this every time. Also on iOS if you have the app open, lock the phone, and then unlock you will be at the home screen. Almost as if the app ran out of memory or crashed in the background.

Side effects of RN?

Re: React Native at Instagram

#49

@martinbigio here in case anyone has questions

Probably OT but a bug that's been driving me crazy for a while now. When I open Instagram it reloads the feed every time as if the app had been purged from memory. This means if I accidentally close the app and reopen it my scroll position is lost and thanks to the sort algorithm the feed order has changed and I can't get back to where I was.

See this every time. Also on iOS if you have the app open, lock the phone, and then unlock you will be at the home screen. Almost as if the app ran out of memory or crashed in the background.

Side effects of RN?

Re: React Native at Instagram

#50

@martinbigio here in case anyone has questions

Thanks for the post, very interesting! The post talks about the percentage of the code shared between iOS and Android. Is there any shared code with the web as well, or is that a completely separate react app?
Post reply on HN