1- /**
2- * Sample React Native App
3- * https://github.com/facebook/react-native
4- *
5- * @format
6- * @flow strict-local
7- */
8-
9- import React from 'react' ;
10- import type { Node } from 'react' ;
1+ import React from 'react'
112import {
123 SafeAreaView ,
134 ScrollView ,
@@ -16,18 +7,18 @@ import {
167 Text ,
178 useColorScheme ,
189 View ,
19- } from 'react-native' ;
10+ } from 'react-native'
2011
2112import {
2213 Colors ,
2314 DebugInstructions ,
2415 Header ,
2516 LearnMoreLinks ,
2617 ReloadInstructions ,
27- } from 'react-native/Libraries/NewAppScreen' ;
18+ } from 'react-native/Libraries/NewAppScreen'
2819
29- const Section = ( { children, title} ) : Node => {
30- const isDarkMode = useColorScheme ( ) === 'dark' ;
20+ const Section = ( { children, title } ) => {
21+ const isDarkMode = useColorScheme ( ) === 'dark'
3122 return (
3223 < View style = { styles . sectionContainer } >
3324 < Text
@@ -36,7 +27,8 @@ const Section = ({children, title}): Node => {
3627 {
3728 color : isDarkMode ? Colors . white : Colors . black ,
3829 } ,
39- ] } >
30+ ] }
31+ >
4032 { title }
4133 </ Text >
4234 < Text
@@ -45,31 +37,34 @@ const Section = ({children, title}): Node => {
4537 {
4638 color : isDarkMode ? Colors . light : Colors . dark ,
4739 } ,
48- ] } >
40+ ] }
41+ >
4942 { children }
5043 </ Text >
5144 </ View >
52- ) ;
53- } ;
45+ )
46+ }
5447
55- const App : ( ) => Node = ( ) => {
56- const isDarkMode = useColorScheme ( ) === 'dark' ;
48+ const App = ( ) => {
49+ const isDarkMode = useColorScheme ( ) === 'dark'
5750
5851 const backgroundStyle = {
5952 backgroundColor : isDarkMode ? Colors . darker : Colors . lighter ,
60- } ;
53+ }
6154
6255 return (
6356 < SafeAreaView style = { backgroundStyle } >
6457 < StatusBar barStyle = { isDarkMode ? 'light-content' : 'dark-content' } />
6558 < ScrollView
6659 contentInsetAdjustmentBehavior = "automatic"
67- style = { backgroundStyle } >
60+ style = { backgroundStyle }
61+ >
6862 < Header />
6963 < View
7064 style = { {
7165 backgroundColor : isDarkMode ? Colors . black : Colors . white ,
72- } } >
66+ } }
67+ >
7368 < Section title = "Step One" >
7469 Edit < Text style = { styles . highlight } > App.js</ Text > to change this
7570 screen and then come back to see your edits.
@@ -87,8 +82,8 @@ const App: () => Node = () => {
8782 </ View >
8883 </ ScrollView >
8984 </ SafeAreaView >
90- ) ;
91- } ;
85+ )
86+ }
9287
9388const styles = StyleSheet . create ( {
9489 sectionContainer : {
@@ -107,6 +102,6 @@ const styles = StyleSheet.create({
107102 highlight : {
108103 fontWeight : '700' ,
109104 } ,
110- } ) ;
105+ } )
111106
112- export default App ;
107+ export default App
0 commit comments