Skip to content

fix: add missing react-navigation props#511

Merged
thiagobrez merged 1 commit intomainfrom
fix/react-navigation-missing-props
Apr 14, 2026
Merged

fix: add missing react-navigation props#511
thiagobrez merged 1 commit intomainfrom
fix/react-navigation-missing-props

Conversation

@thiagobrez
Copy link
Copy Markdown
Collaborator

@thiagobrez thiagobrez commented Apr 14, 2026

PR Description

Props screenLayout, UNSTABLE_routeNamesChangeBehavior and UNSTABLE_router were not passed down to the react-navigation builder, so they couldn't be used in the navigator.

This PR bumps the react-navigation versions and passes down these props so they can be used in the NativeBottomTabNavigator.

Example:

function ScreenLayout({
  children,
  route,
}: {
  children: React.ReactNode;
  route: { name: string };
}) {
  return (
    <View style={styles.container}>
      <View style={styles.banner}>
        <Text style={styles.bannerTitle}>screenLayout active</Text>
        <Text style={styles.bannerSubtitle}>{route.name}</Text>
      </View>
      <View style={styles.content}>{children}</View>
    </View>
  );
}

export default MyNavigator() {
    return (
        <Tab.Navigator screenLayout={ScreenLayout}>
            ...
        </Tab.Navigator>
    )
}

How to test?

Added a new example route in the test app: "Native Bottom Tabs with screenLayout"

Open the example route and notice the layout common to all tabs. Change tabs and notice the route name changing in the common layout.

Screenshots

CleanShot 2026-04-14 at 14 51 07

@thiagobrez thiagobrez added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit 652fd76 Apr 14, 2026
9 checks passed
@thiagobrez thiagobrez deleted the fix/react-navigation-missing-props branch April 14, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants