在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
谢谢