ReactNative
ใๅงใใใซใใใฃใฆใ้ๅฝขใไฝๆใใๆๆฎตใใใใคใใใใพใใ
create-react-native-app
๏ผๅ ฌๅผใตใคใๆฒ่ผ๏ผreact-native init
๏ผๅ ฌๅผใตใคใๆฒ่ผ๏ผexp init
๏ผ้ๅ ฌๅผ๏ผ
ๅฎ้ใซๆง็ฏใใฆใใใใใใซใฉใใใ้ใใใใใฎใ่ชฟๆปใใฆใฟใพใใใ
ใชใใไปๅใฎๆค่จผใงๅฉ็จใใใณใผใใฏไปฅไธใฎใชใใธใใชใซ็ฝฎใใฆใใพใใฎใงใใ่ช็ฑใซใๅฉ็จไธใใใ
ใพใใๆฌ่จไบไฝๆใซใใใฃใฆใฏใใใใใใฎๅ ฌๅผใตใคใใๅ่ใซใใพใใใ
create-react-native-app
# install
$ npm install -g create-react-native-app
$ create-react-native-app RNAppWithCreateReactNativeApp
# create-react-native-app version
$ create-react-native-app --version
create-react-native-app version: 1.0.0
# structure
$ tree RNAppWithCreateReactNativeApp/ -L 1
RNAppWithCreateReactNativeApp/
โโโ App.js
โโโ App.test.js
โโโ README.md
โโโ app.json
โโโ node_modules
โโโ package.json
โโโ yarn.lock
Install the Expo client app on your iOS or Android phone and connect to the same wireless network as your computer. Using the Expo app, scan the QR code from your terminal to open your project.
ใใฉใซใๆงๆใใใญใฅใกใณใใ่ฆใๆใใๅฎ่ณชexpo
ใๅฉ็จใใ้็บใ่กใๅ ดๅใฎ้ๅฝขใซใชใๆใใงใใญใexpo
ใฏไปฅๅ่งฆใฃใใใจใใใใใงใใใใใคใใฃใใณใผใใฏๅ
จใๆธใใชใๅ ดๅใซใฏexpo
ใฎๆนใใทใณใใซใง่ฏใๅฐ่ฑกใ
ๅไบบ้็บใงใใใฐใใใใใใคใใฃใใณใผใใฏๆธใใชใใใใซ่จญ่จ/ๅฎ่ฃ ใใฆใใใจๆใใฎใงใใใกใใฎๆนใ่ฏใใใใ
ใใ ๅฎๅๆกไปถใใผในใง่ใใใจใ่ฆไปถใซใใฃใฆใฏใใคใใฃใใณใผใใๆธใใชใใจใใใชใๅ ด้ขใซ็ด้ขใใใใชๆฐใใใฆใใฆใใใใ่ใใใจexpo
ใใผในใใใชใๆนใใใใใชใใจใใๅคๆญใ
react-native init
# install
$ npm install -g react-native-cli
$ react-native init RNAppWithReactNativeInit
# react-native version
$ react-native --version
react-native-cli: 2.0.1
# structure
$ tree RNAppWithReactNativeInit/ -L 1
RNAppWithReactNativeInit/
โโโ App.js
โโโ android
โโโ app.json
โโโ index.js
โโโ ios
โโโ node_modules
โโโ package.json
โโโ yarn.lock
ใใใ็้ใฎReactNative
ใฎไฝใๆนใงใใญใiOS็ฌ่ชใฎใAndroid็ฌ่ชใฎใใจใใใใๅ ดๅใซใฏใใใใไฝฟใใใจใซใชใใใใใชใใใจใ
ไปใฏใใ็จๅบฆReactNative
ๅดใงๅฏพๅฟใใใฆใใใชใฎใงใใใใชใซ็ฌ่ชๅฆ็ใๆธใใฃใฆ้จๅใฏ็กใใใ๏ผใใฎใธใใฏๅฎ้ใซๆธใใฆใใใชใใจใใใใชใใชใใ
exp init
# install
$ npm install exp --global
$ exp init RNAppWithExpo
# exp version
$ exp --version
52.0.3
# structure
$ tree RNAppWithExpo/ -L 1
RNAppWithExpo/
โโโ App.js
โโโ app.json
โโโ assets
โโโ node_modules
โโโ package.json
ใใกใใฏใใซใใซใงexpo
ใซ้ ผใๅใฃใ้็บใใใ้ใซไฝฟใๆใใซใชใใใจๆใใพใใexpo
ใ่งฆใฃใๆๆใฏไธ่จใฎ้ใใ
ใฉใใไฝฟใใฎใใใฟใผใ๏ผ
ๅฎๅใใผในใง่ใใฆใreact-native init
ใๅไบบ็ใซใฏใชในในใกใ
๏ผๆชๆค่จผใ ใใฉ๏ผreact-native init
ใงไฝๆใใฆใexpo
ใงใฎ้
ๅธใฏใงใใใ ใใใใใจใใใใใใฃใฆใฟใใจใใ็ถๆณไธใงใใใฐใreact-native init
ใง้ฒใใๆนใ็ก้ฃใใจใใในใใใใใฉใซใใง่จญๅฎใใใฆใใใ
ใใใใฎ่พบใฎ็ฅ่ฆใฎใใๆนใใใฃใใใใฐใณใกใณใใใ ใใ:D