How to detect typed character is the backspace/delete
if (e.nativeEvent.key === 'Backspace')
tried this but not working
https://facebook.github.io/react-native/docs/textinput#onkeypress
<TextInput
onKeyPress={({ nativeEvent }) => {
if (nativeEvent.key === 'Backspace') {
...doTheMagic();...
}
}}
/>
Live example: https://snack.expo.io/@zvona/backspace
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