Open OmarOdaini opened 4 years ago
I need to ask user for input onPress. Obviously this code doesn't work but I want something like that:
const Newact = (props) => { return( <View> <View style={styles.button} > <TouchableOpacity style={styles.center} onPress= {prompt = ('','', [ {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, {text: 'OK', onPress: password => console.log('OK Pressed, password: ' + password)}, ], { type: 'secure-text', cancelable: false, defaultValue: '', placeholder: 'placeholder' } )}> <Text style={styles.plusSign}>+</Text> </TouchableOpacity> </View> </View> ); }
I need to ask user for input onPress. Obviously this code doesn't work but I want something like that: