React Native Navigation v6 white background flashing when switching between screens

Viewed 345

I am using React Native Navigation version 6 in my project. A white background flashes when switching between screens. Only stack navigator has this problem. I did not encounter this problem on iOS.

My Stack Navigator

import React from 'react';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Login from '../screens/Login';
import Register from '../screens/Register';
import ForgotPassword from '../screens/ForgotPassword';
import {NavigationContainer, DefaultTheme} from '@react-navigation/native';
import {View} from 'react-native'
const Stack = createNativeStackNavigator();

const SignedOutStack = () => {
  return (
      <NavigationContainer>
        <Stack.Navigator
          screenOptions={{
            headerShown: false,
          }}>
          <Stack.Screen name="Login" component={Login} />
          <Stack.Screen name="Register" component={Register} />
          <Stack.Screen name="ForgotPassword" component={ForgotPassword} />
        </Stack.Navigator>
      </NavigationContainer>
  );
};

export default SignedOutStack;
1 Answers

You can change the stack background with cardStyle option. See here.

Related