Prevent creating non visibile view in RNTester

Summary:
Small refactor to prevent creating non visibile view in RNTester

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D25869868

fbshipit-source-id: 4873bf5f9de99612806df2d02adb73d21d3185db
This commit is contained in:
David Vacca
2021-01-11 09:42:33 -08:00
committed by Facebook GitHub Bot
parent 5803c72982
commit 2d64dde3e6
+6 -5
View File
@@ -45,11 +45,12 @@ const APP_STATE_KEY = 'RNTesterAppState.v3';
// TODO: Vendor AsyncStorage or create our own.
LogBox.ignoreLogs([/AsyncStorage has been extracted from react-native/]);
const DisplayIfVisible = ({isVisible, children}) => (
<View style={[styles.container, !isVisible && styles.hidden]}>
{children}
</View>
);
const DisplayIfVisible = ({isVisible, children}) =>
isVisible ? (
<View style={[styles.container, !isVisible && styles.hidden]}>
{children}
</View>
) : null;
type ExampleListsContainerProps = $ReadOnly<{|
theme: RNTesterTheme,