小编Rom*_*lle的帖子

是否使用 useState 来反应原生动画 => new Animated.Value() ?

在react-native中使用Animated.Value()的最佳方法是什么?

是否使用 useState() ?

const [fadeAnim] = useState(new Animated.Value(0))
Run Code Online (Sandbox Code Playgroud)

或者

const fadeAnim = new Animated.Value(0)
Run Code Online (Sandbox Code Playgroud)

React-native 文档:https://facebook.github.io/react-native/docs/animations

谢谢

react-native react-hooks

9
推荐指数
2
解决办法
8452
查看次数

标签 统计

react-hooks ×1

react-native ×1