Last active
March 29, 2025 15:13
-
-
Save pablocattaneo/e0aed3104a8c36c339fb1be22ede5d7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The type for the event is NativeSyntheticEvent<TextInputChangeEventData> | |
// example 1 | |
import { TextInput, NativeSyntheticEvent, TextInputChangeEventData } from "react-native"; | |
const onChange = (e: NativeSyntheticEvent<TextInputChangeEventData>): void => { | |
const value = e.nativeEvent.text; | |
doStuff(value); | |
} | |
// eample 2 | |
import { NativeSyntheticEvent, TextLayoutEventData } from "react-native" | |
const onTextLayout = (event: NativeSyntheticEvent<TextLayoutEventData>) => { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment