Anim: Текстовые строки должны отображаться в компоненте <Text> - PullRequest
1 голос
/ 15 июня 2019

Понятия не имею, почему я получаю эту ошибку, может кто-то помочь? текст не отображается

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>

        )
    }

1 Ответ

0 голосов
/ 16 июня 2019

Я полагаю, это вызвано пробелами, скрытыми внутри Animated.View детей. Закрытый тег должен решить проблему.

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