Difference between revisions of "Expo"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
cd my-project | cd my-project | ||
yarn start | yarn start | ||
+ | |||
+ | ==Instalasi Library== | ||
+ | |||
+ | ===Navigasi=== | ||
+ | Untuk navigasi antar pages | ||
+ | expo install react-native-screens react-native-safe-area-context | ||
+ | expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view | ||
+ | |||
+ | npm install @react-navigation/native --save | ||
+ | npm install @react-navigation/stack --save | ||
+ | npm install react-native-webview @react-navigation/native @react-navigation/stack react-native-gesture-handler | ||
+ | |||
+ | Menggunakan yarn (berhasil) | ||
+ | yarn add @react-navigation/native-stack | ||
+ | |||
+ | ===QR Code=== | ||
+ | Untuk membaca QR code | ||
+ | expo install expo-barcode-scanner | ||
+ | |||
+ | ===Axios=== | ||
+ | Untuk API dapat menggunakan axios | ||
+ | npm install axios | ||
==Pranala menarik== | ==Pranala menarik== | ||
Line 23: | Line 45: | ||
==Referensi== | ==Referensi== | ||
* https://docs.expo.dev/ | * https://docs.expo.dev/ | ||
+ | * https://reactnative.dev/docs/navigation | ||
+ | * https://docs.expo.dev/versions/latest/sdk/bar-code-scanner/ |
Latest revision as of 17:22, 21 July 2022
Contents
Instalasi
npm install --global expo-cli
Membuat project baru
expo init my-project
Jika ingin menggunakan device asli, bisa install Expo Go, atau nanti akan diinstall ketika akan dijalankan (device tersambung). Cek device yang terhubung dengan
adb devices
Running aplikasi
Masuk ke folder
cd my-project yarn start
Instalasi Library
Untuk navigasi antar pages
expo install react-native-screens react-native-safe-area-context expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
npm install @react-navigation/native --save npm install @react-navigation/stack --save npm install react-native-webview @react-navigation/native @react-navigation/stack react-native-gesture-handler
Menggunakan yarn (berhasil)
yarn add @react-navigation/native-stack
QR Code
Untuk membaca QR code
expo install expo-barcode-scanner
Axios
Untuk API dapat menggunakan axios
npm install axios