mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
5803c72982
commit
2d64dde3e6
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user