1/\*\*  
2 \* Sample React Native App  
3 \* https://github.com/facebook/react-native  
4 \* @flow  
5 \*/  
6
7import React, { Component } from "react";  
8import { Platform, StyleSheet, View, Button, TextInput, } from "react-native";  
9
10export default class App extends Component {  
11
12  render() {  
13return (  
14<View style={styles.container}>  
15
16<TextInput  
17          placeholder="Enter Your Mobile Number"  
18          underlineColorAndroid='transparent'  
19          style={styles.TextInputStyle}  
20**keyboardType={'numeric'}**  
21/>  
22
23</View>  
24);  
25}  
26}  
27
28const styles = StyleSheet.create({  
29  container: {  
30    flex: 1,  
31    justifyContent: 'center',  
32},  
33  headerText: {  
34    fontSize: 20,  
35    textAlign: "center",  
36    margin: 10,  
37    fontWeight: "bold"  
38},  
39TextInputStyle: {  
40    textAlign: 'center',  
41    height: 40,  
42    borderRadius: 10,  
43    borderWidth: 2,  
44    borderColor: '#009688',  
45    marginBottom: 10  
46}  
47});
481import 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}