Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

why app created with react native cli command contain type script in app.js file?

$
0
0
import type {Node} from 'react';const Section = ({children, title}): Node => {  const isDarkMode = useColorScheme() === 'dark';  return (<View style={styles.sectionContainer}><Text        style={[          styles.sectionTitle,          {            color: isDarkMode ? Colors.white : Colors.black,          },        ]}>        {title}</Text><Text        style={[          styles.sectionDescription,          {            color: isDarkMode ? Colors.light : Colors.dark,          },        ]}>        {children}</Text></View>  );};const App: () => Node = () => {  const isDarkMode = useColorScheme() === 'dark';  const backgroundStyle = {    backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,  };  return (<SafeAreaView style={backgroundStyle}><StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} /><ScrollView        contentInsetAdjustmentBehavior="automatic"        style={backgroundStyle}><Header /><View          style={{            backgroundColor: isDarkMode ? Colors.black : Colors.white,          }}><Section title="Step One">            Edit <Text style={styles.highlight}>App.js</Text> to change this            screen and then come back to see your edits.</Section><Section title="See Your Changes"><ReloadInstructions /></Section><Section title="Debug"><DebugInstructions /></Section><Section title="Learn More">            Read the docs to discover what to do next:</Section><LearnMoreLinks /></View></ScrollView></SafeAreaView>  );};

i created a fresh app with npx react-native init myAppName command i opened app js fileto make changes , but i found typescript code inthe import statement and const section node , const app node are typescript , did i created typescript app??or it's still react native cli , is it gonna create any issues in future of this app


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>