I've been trying to get react-navigation to play nice with typescript, but I'm having a hard time with all the warnings.
I tried looking into the types api but I can't really find what I'm supposed to do to make the warning go away.
const VenueDetails: NavigationScreenComponent<NavigationScreenProps> = ({
navigation
}) => {
const venueId: NavigationScreenProp<string> = navigation.getParam(
'id',
'NO-ID'
)
return(...)
}
so getParam throws the following warning:
Argument of type '"id"' is not assignable to parameter of type '"navigation" | "screenProps" | "navigationOptions"'.ts(2345)
And I have no idea what I'm doing wrong.