When I define my NavigationContainer
on separate file I get following error:
'NavigationContainer' refers to a value, but is being used as a type here. Did you mean 'typeof NavigationContainer'?
But when I define it in App.tsx
works.
import React from 'react'import { NavigationContainer } from '@react-navigation/native';import { createStackNavigator } from '@react-navigation/stack';const Stack = createStackNavigator();function AppNavigator() { return (<NavigationContainer><Stack.Screen name={Routes.SPLASH} component={SplashScreen} options={{ headerShown: false, }} /></NavigationContainer> )}export default AppNavigator
What is my problem?