import * as React from 'react'; import { Platform, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; type Props = { visible: boolean; children: React.ReactNode; style?: StyleProp; }; const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container export default function ResourceSavingScene({ visible, children, style, ...rest }: Props) { if (Platform.OS === 'web') { return ( ); } return ( {children} ); } const styles = StyleSheet.create({ container: { flex: 1, overflow: 'hidden', }, attached: { flex: 1, }, detached: { flex: 1, top: FAR_FAR_AWAY, }, });