What is an alternative of textarea in react-native?

Yes there is. It’s called TextInput, the normal TextInput Component supports multiple lines.

Just assign following properties to your TextInput Component

multiline = {true}
numberOfLines = {4}

At the end you should have this:

<TextInput
    multiline={true}
    numberOfLines={4}
    onChangeText={(text) => this.setState({text})}
    value={this.state.text}/>

Source https://facebook.github.io/react-native/docs/textinput

Leave a Comment