react-native demo development environment

Expo go official website:

https://expo.dev/

Install scaffolding:

yarn global add expo-cli

Create the project and start:

expo init my-app

cd my-app

yarn start

Expo developer tools:

 Mobile phone download debugging software:

Make sure that the mobile phone and the computer are in the same local area network with the camera of the iPhone to scan the QR code in the expo developer tools:

 Code:

 

Install Android emulation debugging on the computer:

android-studio download and install:

https://android-studio.en.softonic.com/

Download: android-sdk_r24.4.1-windows.zip

 

App.js:

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text style={
   
   {color: "red", fontSize: 50}}>hello,world!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Guess you like

Origin blog.csdn.net/xutongbao/article/details/122703066