I'm trying to pass as props a function which will return props.navigation.navigate and change the screen:
handleSubmit = (formState: AddContactFormState) => { this.props.navigation.navigate('ContactList', { newContact: formState }) } render() { return <AddContactForm onSubmit={this.handleSubmit} /> }
In my types.tsx file:
export type AddContactFormProps = { fn: (formState: AddContactFormState) => /* ??? */}
Any help would be greatly appreciated as I was unable to find any docs explaining all the types in React Navigation. Thanks.