I have an input element in react-native, which its onChange is binded to handleClientInput. I'm assigning the dynamic data to a state, It works perfectly on the web, but on an android device event.target.value is returning undefined:
const handleClientIDInput = (event) => {
console.log("Input change");
console.log(event.target.value); // logs undefined
setClientID(event.target.value);
};
This is my return for my functional component:
return (
<SafeAreaView>
<TextInput
style={{
borderWidth: 1,
borderColor: "black",
}}
onChange={handleClientIDInput}
/>
<Button title="Proceed" onPress={handleButtonClick} />
</SafeAreaView>
);
I am using React Native and not ReactJS, since this works okay on ReactJS