Reactjs 动画:文本字符串必须在<;文本>;成分

Reactjs 动画:文本字符串必须在<;文本>;成分,reactjs,react-native,react-animated,Reactjs,React Native,React Animated,我不知道我为什么会犯这个错误有人能帮我吗?没有正在呈现的文本 render() { const { width, height } = Dimensions.get('window') const animatedHeight = {             transform : this.animated.getTranslateTransform() } return ( <Animat

我不知道我为什么会犯这个错误有人能帮我吗?没有正在呈现的文本

render() {

const { width, height } = Dimensions.get('window')
        const animatedHeight = {
                        transform : this.animated.getTranslateTransform()
        }
        return (
            <Animated.View style={{flex:1, backgroundColor:'red'}}>
                <Animated.View style={[animatedHeight, { position: 'absolute', left: 0, right: 0, zIndex: 10, backgroundColor: 'white', height: height }]}>

                </Animated.View>
            </Animated.View>

        )
    }
render(){
const{width,height}=Dimensions.get('window')
常量动画高度={
transform:this.animated.getTranslateTransform()
}
返回(
                
            
)
}

我猜这是由隐藏在
动画中的空格造成的。查看
子对象。自我封闭的标签应该可以解决这个问题

<Animated.View
  style={[
    animatedHeight, 
    {
      position: 'absolute',
      left: 0, 
      right: 0, 
      zIndex: 10, 
      backgroundColor: 'white', 
      height: height
    }
  ]}
/>

请提供更完整的代码。此代码没有显示任何内容。