Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Why my export function call every time on change TextInput

$
0
0

HI there here is my code in react and type script Why this console.log , calls every time that my text filed change trigger ..

export default function TabOneScreen({  navigation,}) {  const [out_1, set_out1] = useState('');  const [out_2, set_out2] = useState('');  const [main_device, setMain_dev] = useState('');  console.log("run every time .. on text changed .."); // on change  text run every time .. // here I had some function for init textInput value and don't want to run every time ..  return (<View style={styles.container}><View style={{      }}><TextInput          value={out_1}          onChangeText={(username) => set_out1(username)}.         />

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>