创建RN应用

  • 使用 Expo 指令创建项目

    1
    npx create-expo-app@latest MyNewProject
  • 使用 React native指令创建项目

    1
    npx @react-native-community/cli@latest init SampleApp --version 0.84.1

执行

1
2
3
npm run android
npx expo start
npx expo run:android