Skip to content
New issue

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

Header jumps #540

Closed
AlexSmirnov9107 opened this issue Jun 12, 2020 · 4 comments
Closed

Header jumps #540

AlexSmirnov9107 opened this issue Jun 12, 2020 · 4 comments

Comments

@AlexSmirnov9107
Copy link

ezgif com-video-to-gif (1)

Navigation Structure

- FastAuth Screen
- Main Stack
       - Profile Stack
          - Profile Screen

App.tsx

import {createNativeStackNavigator} from 'react-native-screens/native-stack';

const Stack = createNativeStackNavigator();

<NavigationContainer theme={theme}>
          <Stack.Navigator
            initialRouteName={ 'FastAuth'}
            screenOptions={{
              headerShown: false,
              stackAnimation: 'fade',
            }}>
            <Stack.Screen name="FastAuth" component={FastAuthScreen} />
            <Stack.Screen name="Main" component={MainStack} />
          </Stack.Navigator>
 </NavigationContainer>

MainStack.tsx

import {createDrawerNavigator} from '@react-navigation/drawer';

const Drawer = createDrawerNavigator();

export default class MainRoute extends Component {
  render() {
    return (
      <Drawer.Navigator
        drawerStyle={{
          width: '88%',
        }}
        drawerContentOptions={{
          contentContainerStyle: {
            paddingTop: 0,
          },
        }}
        drawerContent={(props) => <DrawerContent {...props} />}>
        <Drawer.Screen name="Profile" component={ProfileStack} />
        <Drawer.Screen name="Dashboard" component={DashboardScreen} />
      </Drawer.Navigator>
    );
  }
}

ProfileStack.tsx

import { createNativeStackNavigator } from 'react-native-screens/native-stack';

const Stack = createNativeStackNavigator();

export default class ProfileStack extends Component {
  static contextType = AppContext;
  context!: React.ContextType<typeof AppContext>;

  render() {
    const {t, theme} = this.context;
    return (
      <Stack.Navigator>
        <Stack.Screen  name="Profle"  component={ProfileScreen}  />
      </Stack.Navigator>
    );
  }
}

    "@react-native-community/async-storage": "^1.11.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/drawer": "^5.8.2",
    "@react-navigation/native": "^5.5.1",
    "@react-navigation/stack": "^5.5.1",
    "react-native-safe-area-context": "^3.0.2",
    "react-native-screens": "^2.8.0",
    "react-native": "0.62.2",
@WoLewicki
Copy link
Member

Can you provide a repo/snack with minimal configuration needed to reproduce the issue?

@WoLewicki
Copy link
Member

I am closing it due to no response in more than 30 days. Feel free to comment to reopen it.

@kamlesh71
Copy link

I am also facing the same issue, I've stack navigation in bottom tabs, and when I am moving between tabs, header flickers.

@WoLewicki
Copy link
Member

Can you provide a repo/snack with minimal configuration needed to reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants