微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

类型错误:未定义不是一个对象评估'_reactNativeReanimated.EasingNode.linear'

如何解决类型错误:未定义不是一个对象评估'_reactNativeReanimated.EasingNode.linear'

使用“react-native-floating-label-input”时遇到什么问题:“^1.3.9” 如果您有任何使用“react-native-floating-label-input”的方法,请给我(附上源代码)。 图像 My problem image

我的代码

import React,{useState} from 'react';
import { StyleSheet,TouchableOpacity,View,Image} from 'react-native';
import { useTranslation,} from 'react-i18next'
import { useNavigation } from '@react-navigation/native';
import styles from './style'
import images from '../../theme/images';
import { colors } from 'react-native-elements';
import { FloatingLabelInput } from 'react-native-floating-label-input';
interface SignInScreenProps {

}

const SignInScreen: React.FC<SignInScreenProps> = () => {

  const { t } = useTranslation()
  const navigation = useNavigation()
  const [phone,setPhone] = useState('')

  return (
    <View style={styles.container}>
      <View>
        <Image source={images.logo}
        style={styles.logoStyle}>
        </Image>
      </View>
      <View style={{ flex: 1,backgroundColor: colors.white,borderTopLefTradius: 20,borderTopRighTradius: 20}}>
      <FloatingLabelInput
        label={'label'}
        value={phone}
        rightComponent={(
          <TouchableOpacity style={{ alignContent:'center',justifyContent:'center'}} onPress={()=>{console.log('X clicked')}}></TouchableOpacity>
        )}
        onChangeText={(val) => setPhone(val)}
      />
      </View>
    </View>
  )
}

export default SignInScreen;

解决方法

1.3.5 或更高版本 - react-native-reanimated v2

  • 所有动画现在都使用 react-native-reanimated v2,因为它是 近日正式发布。请关注软件大厦 react-native-reanimated v2 的安装指南: https://docs.swmansion.com/react-native-reanimated/docs/installation

  • OBS.: 如果在 Software Mansion 安装期间指导您的项目 不会构建或构建但在启动时崩溃,请尝试删除 node_modules 文件夹。

  • OBS。 2:如果你不想使用新的 react-native-reanimated v2, 不要升级到这个版本,安装版本 1.3.4 和 react-native-reanimated@1.13.2

https://github.com/Cnilton/react-native-floating-label-input#version-135-or-higher---react-native-reanimated-v2

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?