createAnimatedComponent
默认的情况下Animated.View、Animated.Text和Animated.Image支持动画。有的时候,你需要其他的某些组件也变成动画组件,方法createAnimatedComponent可以完成这个任务。它会把的组件props或者state等属性和Animated.Value自动绑定起来。
比如ScrollView:
let AnimatedScrollView = Animated.createAnimatedComponent(ScrollView)