Skip to content

Fix/bottom nav use href react 7#4644

Closed
wtvamp wants to merge 2 commits intocallstack:mainfrom
Delmock-Technologies-Inc:fix/bottom-nav-use-href-react-7
Closed

Fix/bottom nav use href react 7#4644
wtvamp wants to merge 2 commits intocallstack:mainfrom
Delmock-Technologies-Inc:fix/bottom-nav-use-href-react-7

Conversation

@wtvamp
Copy link
Copy Markdown

@wtvamp wtvamp commented Mar 3, 2025

Motivation

Currently, the Bottom Tab Navigator (react-native-paper/react-navigation) cannot be used with the latest version of react-navigation (7.x) or with the latest expo-router due to changes in the react-navigation API. The issue is that useLinkBuilder now returns an object instead of a builder function.

Related issue

#4601

Test plan

Ran lint, tslint, and tests - in relation to changes, fixed all errors and all passing. There are errors in other components in main that currently don't pass.

Tested with yarn example start and yarn example web

This pull request includes updates to dependencies and improvements to the MaterialBottomTabView component in the src/react-navigation/views directory. The most important changes are grouped into dependency updates and component enhancements.

Dependency Updates:

  • Updated @react-navigation/native to version ^7.0.15 in package.json.

Component Enhancements:

  • Added ColorValue import from react-native in MaterialBottomTabView.tsx.
  • Introduced a new RenderTouchableProps type to improve type safety for the renderTouchable function.
  • Refactored the renderTouchable function to use buildHref instead of buildLink and ensured rippleColor is applied correctly.
  • Simplified the getLabelText function to use the nullish coalescing operator for better readability.
  • Reformatted the onTabLongPress function for better code readability.

@callstack-bot
Copy link
Copy Markdown

Hey @wtvamp, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@lukewalczak lukewalczak closed this May 5, 2025
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.

3 participants