您好我正在尝试使用标签栏的屏幕,但我无法继续,因为错误阻止了我.我知道我确实遵循了一些教程,但在我的情况下它没有用.
错误:Screen_Shot
目标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没有初始化.尝试在TabNav之前放置Kaartihan
总结以上是内存溢出为你收集整理的javascript – React Native – 路由’…’的组件必须是React组件全部内容,希望文章能够帮你解决javascript – React Native – 路由’…’的组件必须是React组件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)