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

Accessing a component with RN Tabs.Container functionality is very slow. #412

Open
Yawan-1 opened this issue May 26, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@Yawan-1
Copy link

Yawan-1 commented May 26, 2024

Hi,

I have noticed a performance issue in one of my components where I have implemented Tabs.Container with renderHeader. When I navigate back to this component from another one that includes collapsible tabs, the navigation speed is significantly slower. However, when I remove the Tabs.Container and only leave the top component, the navigation speeds up. Reverting to the Tabs.Container causes a delay of about 2-3 seconds in navigation. This issue does not seem to be related to the navigation library, as removing the Tabs resolves the problem. Therefore, I suspect that the Tabs.Container may be the cause of this behavior.

    <Tabs.Container
      renderHeader={() => (
        <Header
          route={route}
          t={translate}
        />
      )}
      containerStyle={styles.container}
      renderTabBar={renderTabBar}
    >
      <Tabs.Tab name="First">
        <Tabs.ScrollView>
          <SecondTopTabComponent />
        </Tabs.ScrollView>
      </Tabs.Tab>
      <Tabs.Tab name="Second">
        <Tabs.ScrollView>
          <SecondTopTabComponent />
        </Tabs.ScrollView>
      </Tabs.Tab>
    </Tabs.Container>

so is there something I am doing wrong while rendering the Tabs? My main use is to have a sticky header tabs.

And I just noticed one more thing, When I remove the Tabs.Tab one by one then performance is increasing good. That's means if I have 5 Tabs then it is taking almost 3 seconds to open the page.

Developed a custom Tab View with a fixed header due to the lack of updates and unresolved pull requests for the existing library. This library is almost abandoned.

@Yawan-1 Yawan-1 added the question Further information is requested label May 26, 2024
@khanhkom
Copy link

Waiting for some one resolve this

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

No branches or pull requests

2 participants