We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i'm follow instruction with React Navigation v5, and getting this error. i'm trying to combine stack navigator with tabbar navigator
Describe what you expected to happen:
here my full code navigation.js
import * as React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import AnimatedTabBar from '@gorhom/animated-tabbar'; import { themes } from './utils/config'; import Ionicons from 'react-native-vector-icons/dist/Ionicons'; import Home from './screens/home'; import Login from './screens/login'; import Account from './screens/account'; import TransactionHistory from './screens/transaction-history'; import Shopping from './screens/shopping'; import Notification from './screens/notification'; import Pulsa from './screens/pulsa'; import Electricity from './screens/electricity'; import Checkout from './screens/checkout'; const Stack = createStackNavigator(); const Tab = createBottomTabNavigator(); const horizontalAnimation = { cardStyleInterpolator: ({ current, layouts }) => { return { cardStyle: { transform: [ { translateX: current.progress.interpolate({ inputRange: [0, 1], outputRange: [layouts.screen.width, 0], }), }, ], }, }; }, }; const tabs = { Home: { labelStyle: { color: '#5B37B7', }, icon: { component: props => <Ionicons {...props} name="md-home" size={18} color="black" />, activeColor: 'rgba(91,55,183,1)', inactiveColor: 'rgba(0,0,0,1)', }, background: { activeColor: 'rgba(223,215,243,1)', inactiveColor: 'rgba(223,215,243,0)', }, }, Riwayat: { labelStyle: { color: '#1194AA', }, icon: { component: props => <Ionicons {...props} name="md-file-tray-full" size={18} color="black" />, activeColor: 'rgba(17,148,170,1)', inactiveColor: 'rgba(0,0,0,1)', }, background: { activeColor: 'rgba(207,235,239,1)', inactiveColor: 'rgba(207,235,239,0)', }, }, Akun: { labelStyle: { color: '#1194AA', }, icon: { component: props => <Ionicons {...props} name="md-person" size={18} color="black" />, activeColor: 'rgba(17,148,170,1)', inactiveColor: 'rgba(0,0,0,1)', }, background: { activeColor: 'rgba(207,235,239,1)', inactiveColor: 'rgba(207,235,239,0)', }, }, }; function TabNavigator() { return ( <Tab.Navigator tabBar={props => ( <AnimatedTabBar tabs={tabs} {...props} /> )} > <Tab.Screen name="Home" component={Home} /> <Tab.Screen name="Riwayat" component={TransactionHistory} /> <Tab.Screen name="Akun" component={Account} /> </Tab.Navigator> ) } const navigator = () => { return ( <NavigationContainer> <Stack.Navigator screenOptions={{ headerShown: false }} > <Stack.Screen name="Login" component={Login} options={horizontalAnimation} /> <Stack.Screen name="Index" component={TabNavigator} options={horizontalAnimation} /> <Stack.Screen name="Shopping" component={Shopping} options={horizontalAnimation} /> <Stack.Screen name="Notification" component={Notification} options={horizontalAnimation} /> <Stack.Screen name="Pulsa" component={Pulsa} options={horizontalAnimation} /> <Stack.Screen name="Checkout" component={Checkout} options={horizontalAnimation} /> <Stack.Screen name="Electricity" component={Electricity} options={horizontalAnimation} /> </Stack.Navigator> </NavigationContainer> ) } export default navigator;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug
i'm follow instruction with React Navigation v5, and getting this error.
i'm trying to combine stack navigator with tabbar navigator
Environment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code
here my full code navigation.js
The text was updated successfully, but these errors were encountered: