Hello I'm trying to have a screens with a tab bar, but I can't proceed because an error is blocking me. I know I did follow some tutorial properly but in my case it didn't work.
Error: Screen_Shot
Target UI:
Tab Bar => Ordering (screen) => Category (screen)
Settlement (screen)
Pending (screen)
Code:
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 is not initialized. Try to put Kaartihan before TabNav
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With