News for hackers. Stuff that matters.
Re:Introducing Lottie: Airbnb's tool for adding animations t... by bennyg on Wednesday February 01, 2017 @02:40PM (#13544214)
Are animations in react-native offloaded to the native renderer, or are they in JS?
Re:Introducing Lottie: Airbnb's tool for adding animations t... by lrichardson on Wednesday February 01, 2017 @02:46PM (#13544284)
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)

Re:Introducing Lottie: Airbnb's tool for adding animations t... by misiti3780 on Wednesday February 01, 2017 @03:09PM (#13544576)
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 ?
Re:Introducing Lottie: Airbnb's tool for adding animations t... by lrichardson on Wednesday February 01, 2017 @04:51PM (#13545657)
> 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.

Re:Introducing Lottie: Airbnb's tool for adding animations t... by bennyg on Wednesday February 01, 2017 @06:55PM (#13546687)
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.
Re:Introducing Lottie: Airbnb's tool for adding animations t... by hsavit1 on Wednesday February 01, 2017 @03:15PM (#13544636)
Is your navigation lib taking advantage of this? Just wondering, seeing as how React Navigation uses the Animated API
Re:Introducing Lottie: Airbnb's tool for adding animations t... by lrichardson on Wednesday February 01, 2017 @04:53PM (#13545667)
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.
Re:Introducing Lottie: Airbnb's tool for adding animations t... by hsavit1 on Wednesday February 01, 2017 @05:20PM (#13545959)
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?
Re:Introducing Lottie: Airbnb's tool for adding animations t... by buba447 on Wednesday February 01, 2017 @02:41PM (#13544229)
For Lottie, they are offloaded to native Core Animation. :)