react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Screen is frozen when visible = false @ bottomTabs

Open v-x2 opened this issue 2 years ago • 2 comments

🐛 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")
                    }
                }
            }
        }
    ]
        }
    }
};
  1. 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"

  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): iOS 16.1 Real Device

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

  • ✖️   Yes, I have the time, and I know how to start.
  • ✅   Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️   No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

v-x2 avatar Nov 26 '22 08:11 v-x2

Is there any update about this issue ?

We're facing the same issue.

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

burakakyol avatar Sep 20 '23 11:09 burakakyol

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

can-sevin avatar Sep 20 '23 11:09 can-sevin