Hacker News new | ask | show | jobs
by lrichardson 3424 days ago
Great question. Right now playing the animation with the imperative API in React Native will be driven entirely on the main thread, but the declarative API with `Animated` will not be (yet).

I'm very interested in building the proper hooks natively to allow for usage with `useNativeDriver: true`. We are perfectly situated for this too, considering the author of the iOS side was also the engineer who introduced offloaded animations to React Native on the iOS side!

(Source: I made the Lottie RN bindings, and work on RN at Airbnb)

3 comments

What are you building with RN at airbnb? What has been your experience? If you were starting a mobile company now, would you start with RN ?
> What are you building with RN at airbnb?

Various flows in the Airbnb app are built with React Native. Our recently launched "Experiences" platform is built mostly with React Native, and there are many flows in the app that are built with React Native. Overall it's probably about 10-20% of the app right now. The decision to use or not use React Native for a new feature is a function of what the team building the feature is familiar with, and whether or not we think we can deliver a good user experience with the technology or not. The answers to those questions are quickly evolving though as we build up more infrastructure around React Native, and as the familiarity with the platform grows.

> What has been your experience?

Generally positive, but the difficulty of integrating React Native into an existing mobile app with large existing native code bases should not be understated. It's not plug and play. I'm giving a talk about this in detail at React Conf in March. Make sure to check it out!

> If you were starting a mobile company now, would you start with RN ?

Yes.

Keep in mind that I was the main proponent of React Native being experimented with and adopted at Airbnb. As a result, I have some bias and other people at Airbnb might have different feelings / experiences.

Ahh ok, thanks for the response. JS animations are one of the biggest pain points I have had with RN so far, especially for all of the old Android devices out there.
Is your navigation lib taking advantage of this? Just wondering, seeing as how React Navigation uses the Animated API
It doesn't yet, but I hope to work in integrating these two very very soon. We have to figure out what this will look like on Android, as the TransitionCoordinator on iOS doesn't have an exact equivalent on Android.
That seems extremely interesting! So if you could pull this off, this would be like, we'd see some kind of AE animation mid View transition?