Skip to content

[Due for payment 2026-11-25] [$175] perf: move tab-root gesture logic out of TabNavigator to stop re-renders on navigation #106875

Open

Description

@mountiny

Problem

TabNavigator subscribes to the focused route to turn the parent stack's swipe-back gesture off on tab root screens (Home, Inbox, Search, Insights, Settings). Each navigation changes the focused route, so the whole tab navigator re-renders on every navigation, for example when the Search Router opens. On web, TabNavigator re-rendered 15 times over the tested navigation flow, at about 17 ms each in a dev build.

Solution

Move the gesture logic out of TabNavigator (web) and useNativeTabNavigator (native) into a new TabRootGestureController component that renders nothing and sits next to Tab.Navigator. The controller subscribes only to whether the focused route is a tab root, and calls parentNavigation.setOptions({gestureEnabled}) when that value changes. Navigation now re-renders only this empty component, and the tested flow has no TabNavigator re-renders.

PR

#106820

Issue OwnerCurrent Issue Owner: @hoangzinh
Upwork Automation - Do Not Edit

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 13, 2026
  2. melvin-bot commented on Nov 13, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External)

  3. changed the title [-]perf: move tab-root gesture logic out of TabNavigator to stop re-renders on navigation[/-] [+][$175] perf: move tab-root gesture logic out of TabNavigator to stop re-renders on navigation[/+] on Nov 13, 2026
  4. melvin-bot commented on Nov 13, 2026

    @melvin-bot
  5. changed the title [-][$175] perf: move tab-root gesture logic out of TabNavigator to stop re-renders on navigation[/-] [+][Due for payment 2026-11-25] [$175] perf: move tab-root gesture logic out of TabNavigator to stop re-renders on navigation[/+] on Nov 18, 2026
  6. melvin-bot commented on Nov 18, 2026

    @melvin-bot

    @hoangzinh

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-11-25. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  7. hoangzinh commented on Nov 19, 2026

    @hoangzinh
    Contributor

    No Checklist Needed

    Refactoring issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ExternalAdded to denote the issue can be worked on by a contributorTaskWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions