在 React Native 中,Value for Value 不能从 ReadableNativeMap 转换为 Double

Value for value cannot be cast from ReadableNativeMap to Double in React Native

我正在尝试使用 react-native-reanimated 在文本 ams 上实现动画。 我很确定这是因为动画组件,但无法弄清楚如何解决它。

App.js

import React, {useEffect, useRef} from 'react';
import {Button, StyleSheet, Text, View} from 'react-native';
import Logo from './screens/Logo';
import Animated, { useCode, cond, eq, set } from 'react-native-reanimated';
import { withTimingTransition } from 'react-native-redash';

export default function App() {

  const scale = useRef(new Animated.Value(0));
  const scaleAnimation = withTimingTransition(scale.current);

  useCode(() => cond(eq(scale.current, 0), set(scale.current, 1)), []);

  return (
      <>
        <View style={styles.container}>
          <View style={{ ...styles.logoContainer}}>
            <Logo scale={scaleAnimation} />
          </View>
        </View>
        <NavigationContainer>...</NavigationContainer>
      </>
  );
}

Logo.js

import React, {Component} from 'react';
import Animated from 'react-native-reanimated';
import {Button, StyleSheet, Text, View} from 'react-native';

const Logo = (scale) => (
    <Animated.View style={{ ...styles.logo, transform: [{scale: scale}] }}>
        <Text style={{ fontWeight: "400", fontSize: 36}}> ams </Text>
    </Animated.View>
);
export default Logo;

我在通过体重秤时错过了 { }。

const Logo = ({scale}) => (