React Native - 路由 '...' 的组件必须是 React 组件



你好,我正在尝试一个带有选项卡栏的屏幕,但我无法继续,因为一个错误阻止了我。我知道我确实正确地遵循了一些教程,但在我的情况下,它不起作用。

错误:屏幕_显示

目标UI:

Tab Bar => Ordering (screen) => Category (screen)
Settlement (screen)
Pending (screen)

代码:

import Login from './src/component/screens/Login';
import tables from './src/component/screens/tables';
import Category from './src/component/screens/Category';
import Dishes from './src/component/screens/Dishes';
import Settlement from './src/component/screens/Settlement';
import Pending from './src/component/screens/Pending';
import SendingShit from './src/component/screens/SendingShit';
export default class App extends Component{
render() {
return (
<Root />
);
}
}
const TabNav = createBottomTabNavigator (
{
uggh    : { screen: Kaartihan },       // The problem is here
Settlement  : { screen: Settlement },
Pending     : { screen: Pending },
}
);
const Kaartihan = StackNavigator (
{
Ordering    : { screen: tables },
Category    : { screen: Category },
}
);
const Root = StackNavigator (
{
Login           : { screen: Login },
Tabs            : { screen: TabNav },
Dishes          : { screen: Dishes },
SendingShit     : { screen: SendingShit }
}
);

Kaartihan未初始化。尝试将Kaartihan置于TabNav 之前

相关内容

  • 没有找到相关文章