Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

What type is assigned to props.navigation.navigate in Typescript? (React Native)

$
0
0

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.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>