-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
feat: expose new container for 2-state navigators #1029
Conversation
src/types.tsx
Outdated
/** | ||
* A prop to be used in drawer and bottom-tabs navigators for better implementation of ScreenContainer on iOS. | ||
*/ | ||
tabsOrDrawer?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a prop name like hasTwoStates
(didn't think a lot about the name) or something like that would be more generic and more appropriate
src/index.native.tsx
Outdated
@@ -47,6 +47,8 @@ function enableScreens(shouldEnableScreens = true): void { | |||
|
|||
// const that tells if the library should use new implementation, will be undefined for older versions | |||
const shouldUseActivityState = true; | |||
const isNavigationContainerAvailable = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a case when this won't be available when someone is using this version of react-native-screens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if someone updates to this version of library in Expo managed workflow? I know it should not be done, but 🤷♂️ .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WoLewicki updating to an incompatible version of the library could also cause other issues as well, and surface bugs which are already fixed in latest version, so probably not a use case we should support.
…methods from header
Added new prop `tabsOrDrawer` for `ScreenContainer` which makes `react-native-screens` on `iOS` use new component if it is available. See software-mansion/react-native-screens#1029 for context.
Added new prop `tabsOrDrawer` for `ScreenContainer` which makes `react-native-screens` on `iOS` use new component if it is available. See software-mansion/react-native-screens#1029 for context.
Added new prop `tabsOrDrawer` for `ScreenContainer` which makes `react-native-screens` on `iOS` use new component if it is available. See software-mansion/react-native-screens#1029 for context.
Description
PR adding
RNSScreenNavigationContainer
component on iOS. This component should be used inbottom-tabs
anddrawer
navigators ofreact-navigation
in order to resolve layout issues connected to integration betweenUIViewController
andUINavigationController
containers (see #619 and #564).stack
navigator unfortunately cannot useUINavigationController
since it needs the previous screens to be visible e.g. during the transition. Connected PR inreact-navigation
: react-navigation/react-navigation#9772Changes
Added new component and
hasTwoStates
prop forScreenContainer
which controls which native component should be used.Test code and steps to reproduce
Test619.js
andTest564.js
to see the layout issues gone. It needs settinghasTwoStates
props onbottom-tabs
navigator in order for this to work.Checklist