📜  动画:未指定`useNativeDriver`.这是一个必需选项,必须明确设置为 `true` 或 `false` - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:13.455000             🧑  作者: Mango

代码示例2
const [animatePress, setAnimatePress] = useState(new Animated.Value(1))

const animateIn = () => {
  Animated.timing(animatePress, {
    toValue: 0.5,
    duration: 500,
    useNativeDriver: true // Add This line
  }).start();
}