Live data from Hacker News

React Native at Instagram

engineering.instagram.com

21–30 of 238 posts

Re: React Native at Instagram

#21
post #17

@martinbigio here in case anyone has questions

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 commit (https://github.com/facebook/react-native/commit/a3457486e39d...) for a sneak peek of what's coming up :).

Re: React Native at Instagram

#23
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.

Re: React Native at Instagram

#24

@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.

Re: React Native at Instagram

#25
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 similar experiences?

Re: React Native at Instagram

#26

@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.

Same issue with Facebook web when I use the browser's back button to view my newsfeed.

I'll see a post which interests me for a few seconds and then it's gone. Happens often.

Re: React Native at Instagram

#27
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.

That seems like a big plus for React Native.

What are the negatives you have found?

Re: React Native at Instagram

#28
post #20

@martinbigio here in case anyone has questions

What would be the biggest hurdling block to rewrite the main feed into React Native? As a follow-up, do you think there's a performant enough ListView implementation in RN to build the feed with?

I'll be more blunt: please fix ListView :)

Re: React Native at Instagram

#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.

Re: React Native at Instagram

#30
post #3

I'm getting tired of having to allow scripts to even get to see the images. Why dont they use tags?

The file names are probably bound to some data object that comes back from a service call. Not saying that's a good thing.
Post reply on HN