Closed shovel-kun closed 4 days ago
Hey! Thanks for working on this
FYI there is a guide on how to do this: https://reactnavigation.org/docs/7.x/custom-navigators/
I need to check how can we handle the breaking change
I suggest creating a separate file for version 7 to maintain support for version 6. By default, we can keep version 6 support, and selectively import the new React Navigation v7 integration, for example:
// This will be compatible with v7
import {createNativeBottomTabNavigator} from 'react-native-bottom-tabs/react-navigation/v7';
// This will be compatible with v6
import {createNativeBottomTabNavigator} from 'react-native-bottom-tabs/react-navigation';
Or we can do it the other way around and introduce a breaking change version to set v7 as default.
WDYT? @okwasniewski
Here is first PR that moves us in the direction of supporting React Navigation v7:
https://github.com/okwasniewski/react-native-bottom-tabs/pull/152
It introduces a separate package for the integration: @bottom-tabs/react-navigation
which will be released as 0.6.0, then in 0.7.0 the support for React Navigation v6 will be dropped but people will still be able to use @bottom-tabs/react-navigation@0.6.0
for React navigation v6, this will allow smoother migration to React Navigation v7 and doesn't bring the maintenance cost of supporting two versions indefinitely
Closing as there's a better PR
My attempt at fixing the types of createNativeBottomTabsNavigator in React Navigation 7, as brought up #93
Breaking change, pretty sure this won't work on React Navigation 6.
I referred to the following files for implementation: