admin管理员组文章数量:1336660
Warning: Error: A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found 'Screen' for the screen 'index'). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.
This is my layout Organisation
import { View, Text } from "@components/Themed";
import { Stack } from "expo-router";
import React from "react";
const Layout = () => {
return (
<View className="flex-1">
<Stack
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="index" />
</Stack>
</View>
);
};
export default Layout;
And the _layout.tsx
and index.tsx
are in the same directory.
I'm using "@react-navigation/native": "^7.0.3", and "expo-router": "~4.0.6". This is using File-based Navigation Router.
I have tried updating @react-navigation/native, ran --expo prebuild
.
I have tried a bunch of anisation tactics but none has worked. The moment I use a Stack or Tabs, the app crashes.
本文标签:
版权声明:本文标题:javascript - Since upgrading to Expo 52, I can't create any Stack Layout or Tabs. I always end up with this error - Stac 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742421129a2471678.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论