I have a problem with my react-native app. I have simple input for the note, it works as expected on Android, but on iOS onChange/onChangeText method is never called. It is weird because i see correct value in input, but if I console.log in onChange method, its never called. What am I missing here?
const [noteEdit, _setNoteEdit] = useState(note)
const noteRef = React.useRef(noteEdit);
const setNoteEdit = event => {
const note= event.nativeEvent.text;
_setNoteEdit(note);
noteRef.current = note;
}
<TextInput multiline={true}
value={noteEdit} onChange={setNoteEdit} autoCorrect={false} />
you need to try this below hope it's working
const [noteEdit, _setNoteEdit] = useState('')
<TextInput multiline={true}
value={noteEdit} onChangeText={(text)=>_setNoteEdit(text)} autoCorrect={false} />