diff --git a/packages/bottom-tabs/src/navigators/createBottomTabNavigator.js b/packages/bottom-tabs/src/navigators/createBottomTabNavigator.js index e239ab4989a7f6..c9bedaa50d162e 100644 --- a/packages/bottom-tabs/src/navigators/createBottomTabNavigator.js +++ b/packages/bottom-tabs/src/navigators/createBottomTabNavigator.js @@ -2,6 +2,7 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; +import { ScreenContainer } from 'react-native-screens'; import { polyfill } from 'react-lifecycles-compat'; import createTabNavigator, { type InjectedProps, @@ -94,7 +95,7 @@ class TabNavigationView extends React.PureComponent { return ( - + {routes.map((route, index) => { if (lazy && !loaded.includes(index)) { // Don't render a screen if we've never navigated to it @@ -116,7 +117,7 @@ class TabNavigationView extends React.PureComponent { ); })} - + {this._renderTabBar()} ); diff --git a/packages/bottom-tabs/src/views/ResourceSavingScene.js b/packages/bottom-tabs/src/views/ResourceSavingScene.js index e6d400a8d09703..c3ddd708ae5187 100644 --- a/packages/bottom-tabs/src/views/ResourceSavingScene.js +++ b/packages/bottom-tabs/src/views/ResourceSavingScene.js @@ -2,6 +2,7 @@ import * as React from 'react'; import { Platform, StyleSheet, View } from 'react-native'; +import { Screen, screensEnabled } from 'react-native-screens'; type Props = { isVisible: boolean, @@ -13,6 +14,10 @@ const FAR_FAR_AWAY = 3000; // this should be big enough to move the whole view o export default class ResourceSavingScene extends React.Component { render() { + if (screensEnabled()) { + const { isVisible, ...rest } = this.props; + return ; + } const { isVisible, children, style, ...rest } = this.props; return (