skip to Main Content

How can i get Number in onChangeText in React Native

I have created a userInput in React Native const [first_name, setFirstName] = useState(""); (<View style={styles.InputContainer}> <Text>Fisrt Name</Text> <TextInput value={first_name} onChangeText={(text) => setFirstName(text)} placeholder="John" style={styles.textInput} /> </View>;) and first_name is a string and I have another field for which I want…

VIEW QUESTION

Run promises inside Refresh Control in React Native

Here I have a promise inside refresh control method, const Component = () => { const [refreshing, setRefreshing] = useState(false); const onRefresh = useCallback(() => { setRefreshing(true); getData(); setRefreshing(false); }, []); return ( <ScrollView refreshControl={ <RefreshControl refreshing={refreshing} onRefresh={onRefresh} /> }>...</ScrollView>…

VIEW QUESTION
Back To Top
Search