wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

Screen is frozen when visible = false @ bottomTabs #7645

Open v-x2 opened 1 year ago

v-x2 commented 1 year ago

πŸ› Bug

I've a bottomTabs with three tabs, when pushing a new screen with bottomTabs option visible = false, the screen freezes for 4-10 seconds. If I switch back to visible = true, it works smoothly.

I've encountered this issue only on physical devices, not emulators.

To Reproduce

(Write your steps here:)

  1. Use this Navigation Root:

    export const AppNavigationRoot: LayoutRoot = {
    root: {
        bottomTabs: {
            id: 'HOME_LAYOUT',
            children: [
        {
            stack: {
                id: 'PROFILE_TAB',
                children: [
                    {
                        component: {
                            name: Screens.PersonalProfileScreen,
    
                        }
                    }
                ],
                options: {
                    bottomTab: {
                        icon: getBottomTabIcon('user'),
                        text:  t("Common.My_Profile"),
                    }
                }
            }
        },
        {
            stack: {
                id: 'SEARCH_TAB',
                children: [
                    {
                        component: {
                            name: Screens.SearchScreen,
                        }
                    }
                ],
                options: {
                    bottomTab: {
                        icon: getBottomTabIcon('travels'),
                        text: t("Common.Search")
                    }
                }
            }
        },
        {
            stack: {
                id: 'CHAT_TAB',
                children: [
                    {
                        component: {
                            id: 'CHAT_SCREEN',
                            name: Screens.ChatScreen,
                        }
                    }
                ],
                options: {
                    bottomTab: {
                        icon: getBottomTabIcon('chat'),
                        text: t("Common.Chat")
                    }
                }
            }
        }
    ]
        }
    }
    };
  2. Push another screen:

Navigation.push(componentId, {
            component: {
                name: Screens.Name,
                passProps: {},
                options: {
                   bottomTabs: {
                    visible: false,
                    drawBehind: true,
                },
                },
            },

        });

Your Environment

"react-native-navigation": "^7.30.1", "react-native": "0.70.6"

Are you willing to resolve this issue by submitting a Pull Request?

burakakyol commented 1 year ago

Is there any update about this issue ?

We're facing the same issue.

"react-native-navigation":"^7.26.3", "react-native":"0.71.12"

can-sevin commented 1 year ago

Hi all, Have you got any process on this issue? I have to fix as soon as possible. Also, my project has "react-native": "0.66.5", "react-native-navigation":"^7.26.3"

Thank you for your attention