我创建了一个原生的应用程序与打字稿反应,安装了依赖项,并安装了很多东西试图解决我的问题
似乎在某个模块的子数组中有一个未定义的。
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import HomeScreen from './components/screens/HomeScreen';
const Stack = createNativeStackNavigator();
const Home = (props:any) =>
{
return(
<p>Hola</p>
)
}
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName='Home'>
<Stack.Screen name="Home"
component={HomeScreen}
options={{ title: 'Main Screen' }}
/>
<Stack.Screen name="Hola"
component={Home}
options={{ title: 'asd Screen' }}
/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;