In react-native, how do you animate the size of a View when you dont know the size of it\'s contents?
Let\'s say the View\'s content height can be
I use LayoutAnimation
for that, just before the state change that causes your component's height to change, add:
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
You can use different presets:
linear
You can read more about it here https://facebook.github.io/react-native/docs/layoutanimation.html