I wanted to write a generic Input component in react native with typescript for react-hook-form library.
type InputTextProps = { name: any, control: any}const InputText: FC<InputTextProps> = ({name, control, ...props}) => { const {field} = useController({ name, defaultValue: '', control }) return (<TextInput value={field.value} onChangeText={field.onChange} {...props} /> )}
In the above code, what should i use in InputTextProps ? I also want to extend TextInput's Props.
PS: Is using typescript in react native convenient ? I find is very much to be written especially for react navigation etc...