This is My template code
import React, {Component} from 'react';
import {TextInput, View, Text,} from 'react-native';
const InputT = ({ label , inputvalue, ipOnChangeText, placeholder , secureTextEntry}) => {
const {inputStyle, labelStyle, containerStyle} = styles;
return(
<View style = {containerStyle}>
<Text style= {labelStyle} >{label}</Text>
<TextInput
secureTextEntry={secureTextEntry}
autoCorrect={false}
placeholder={placeholder}
style= {inputStyle}
value = {inputvalue}
onChangeText = {ipOnChangeText}
/>
</View>
);
}
const styles ={
inputStyle:{
color: '#333',
fontSize: 16,
lineHeight: 23,
borderBottomColor: '#333',
borderBottomWidth: 0.5,
fontFamily: 'System',
},
labelStyle:{
fontSize: 18,
color: '#737373',
paddingBottom: 10,
fontFamily: 'System',
},
containerStyle:{
flexDirection: 'column',
marginTop: 10,
marginBottom: 10
}
}
export { InputT };
Based on your question and your comment I think you are passing the wrong property. Change your login form to:
<InputT
label= "Team Size"
placeholder= "eg:10"
value = {this.state.teamsize}
ipOnChangeText = {teamsize => this.setState({ teamsize })}
/>
Notice how I changed onChangeText
for ipOnChangeText
which is the name of the property your InputT
component is expecting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With