mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c9ea05552f
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47109 Fixes the `lint/sort-imports` errors that are now surfaced after fixing the lint configuration. For a couple files, I added lint suppressions instead because the unsorted import ordering is important due to interleaved calls with side effects. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D64569485 fbshipit-source-id: 26415d792e2b9efe08c05d1436f723faae549882
58 lines
1.3 KiB
React
58 lines
1.3 KiB
React
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import React from 'react';
|
|
import {
|
|
SafeAreaView,
|
|
ScrollView,
|
|
StatusBar,
|
|
StyleSheet,
|
|
Text,
|
|
View,
|
|
useColorScheme,
|
|
} from 'react-native';
|
|
import {Colors, Header} from 'react-native/Libraries/NewAppScreen';
|
|
|
|
function App(): React.JSX.Element {
|
|
const isDarkMode = useColorScheme() === 'dark';
|
|
|
|
const backgroundStyle = {
|
|
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
|
|
};
|
|
|
|
return (
|
|
<SafeAreaView style={backgroundStyle}>
|
|
<StatusBar
|
|
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
|
backgroundColor={backgroundStyle.backgroundColor}
|
|
/>
|
|
<ScrollView
|
|
contentInsetAdjustmentBehavior="automatic"
|
|
style={backgroundStyle}>
|
|
<Header />
|
|
<View
|
|
style={{
|
|
backgroundColor: isDarkMode ? Colors.black : Colors.white,
|
|
}}>
|
|
<Text style={styles.title}>Hello, World!</Text>
|
|
</View>
|
|
</ScrollView>
|
|
</SafeAreaView>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
title: {
|
|
fontSize: 24,
|
|
fontWeight: '600',
|
|
},
|
|
});
|
|
|
|
export default App;
|