1import React, { Component } from 'react';
2import { TextInput } from 'react-native';
3
4export default function UselessTextInput() {
5 const [textInputValue, setTextInputValue] = React.useState('');
6
7 return (
8 <TextInput
9 style={{
10 height: 40,
11 borderColor: 'gray',
12 borderWidth: 1,
13 placeholderTextColor: 'gray',
14 }}
15 onChangeText={text => setTextInputValue(text)}
16 value={textInputValue}
17 placeholder="Insert your text!"
18 />
19 );
20}
1import React, { Component } from 'react';
2import { TextInput } from 'react-native';
3
4export default function UselessTextInput() {
5 const [value, onChangeText] = React.useState('Useless Placeholder');
6
7 return (
8 <TextInput
9 style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
10 onChangeText={text => onChangeText(text)}
11 value={value}
12 />
13 );
14}