ReactNative:TextInput在FlexLayout中消失

Sta*_*ing 5 react-native

我正在学习本机反应,当我尝试在flex布局中使用TextInput组件时,它会消失.

index.android.js

//....
render(){
    return (
        <View style={  {flex:1,flexDirection:'row'}}>
            <TextInput placeholder="test"/>
        </View>
    )
}

//....
Run Code Online (Sandbox Code Playgroud)

我很困惑.

Nad*_*bit 2

您需要在 TextInput 上设置高度:

<TextInput placeholder="test" style={{ height:60 }} />
Run Code Online (Sandbox Code Playgroud)