O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The LayoutAnimation API

Our goal is to tap on the date/time component in EditTask and then have it expand downward to reveal the hidden DatePickerIOS component. React Native has an API, called LayoutAnimation, that allows us to create automatically animating layouts.

LayoutAnimation comes with three methods representing default animation curves: easeInEaseOut, linear, and spring. These dictate how the animation behaves throughout its transition. You can simply call one of the three methods under the componentWillUpdate life cycle method and, should a change in your component's state trigger a rerender, LayoutAnimation will add its animation to your changes.

To hide and show the children components passed to ExpandableCell, I can manipulate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required