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

Add React Navigation 7 Support #4601

Open
szado opened this issue Jan 14, 2025 · 0 comments
Open

Add React Navigation 7 Support #4601

szado opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@szado
Copy link

szado commented Jan 14, 2025

Current behaviour

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.

An error occurs: buildLink is not a function.

After a brief investigation, I noticed there was an attempt to add support for react-navigation@7, but the changes were reverted.: https://github.com/callstack/react-native-paper/pull/3958/files

The fix seems quite simple; if we're dealing with v7 (the hook value is an object) we should try to call buildHref method on it.

Docs: https://reactnavigation.org/docs/use-link-builder/

Your Environment

software version
react-native-paper 5.13.1
expo sdk 52.0.25
@szado szado added the bug label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant