Project structure - Expo vs. React Native
June 24, 2020
React Native (CLI)
code
npx react-native init AwesomeTSProject --template react-native-template-typescript
Typisch:
code
.
|-- android/
|-- ios/
|-- App.tsx
|-- app.json
|-- babel.config.js
|-- metro.config.js
|-- package.json
|-- tsconfig.json
Du hast sofort native Ordner und volle Kontrolle.
Expo (Managed)
code
npx create-expo-app@latest my-project
Typisch:
code
.
|-- App.tsx
|-- app.config.js
|-- assets/
|-- package.json
|-- tsconfig.json
Keine ios/ und android/, solange du nicht expo prebuild nutzt.
Expo (Prebuild / Bare)
code
npx expo prebuild
Dann bekommst du ebenfalls ios/ und android/.
Fazit
- React Native CLI: sofort native Kontrolle, mehr Setup.
- Expo Managed: schneller Start, weniger native Arbeit.
- Prebuild: Expo plus native Ordner, wenn du sie brauchst.