0
I have a doubt in typing the prop Navigation of a functional component, my code is currently like this:
import React from 'react';
import { Container, Button, ButtonText } from './styles';
import { NavigationStackProp } from 'react-navigation-stack';
export default function Home({ navigation }: <NavigationStackProp>) {
return (
<Container>
<Button onPress={() => navigation.navigate('Auth')}>
<ButtonText>Logout</ButtonText>
</Button>
</Container>
);
}
But Visual Studio is giving alert in Navigation:
Property 'navigation' does not exist on type '() => any'. ts(2339) As correct that?