[ 卡卡 DAY 3 ] - React Native 环境建立轻松上手

React Native 我的安装步骤:

  1. Node.js,我使用 Homebrew 来安装,所以会先安装 Homebrew!再来安装 Node.js
    Node.js 是用来 build JavaScript 程序。
brew install node
  1. watchman
    Watchman 是用来侦测程序码的变化,以方便重新 build。
brew install watchman
  1. Android Studio
  2. Xcode 可以使用 APP STORE 也可以在网站下载, 只有mac可以安装!
  3. 任何一个IDE,我使用的是 VSCode
  4. React Native CLI
    安装在全域,若无法执行需加上 sudo
npm install -g react-native-cli

於指定资料夹下指令

react-native init <<专案名称>>

进入<<专案名称>>资料夹

cd <<专案名称>>

起专案

npm run ios
//若要指定装置 --simulator="装置名"
react-native run-ios --simulator="iPhone 12"

也或着可以使用 Xcode 开时<<专案名称>>/ios/<<专案名称>>.xcodeproj
https://ithelp.ithome.com.tw/upload/images/20210917/2014201196UlYNg9cr.png
按下去跑起来

专案环境安装完成

https://ithelp.ithome.com.tw/upload/images/20210917/20142011QNgnIkLqjh.png

simulator 模拟器介绍

iOS 模拟器於每次档案有更动时 app 就会自动重新载入,不用我们手动按 Command + R(重新整理),但如果当机可以按一下 XD。
Command + D 是打开 developer menu,但如果没反应,请按 Shift + Command + K ,再尝试一次 Command + D。

比较常使用的就是以下这三个
reload - 重新整里
debug with chrome
Inspector - 打开style检视功能及network

https://ithelp.ithome.com.tw/upload/images/20210917/20142011OUSrUnpPqC.png


<<:  【day3】和牛涮-和牛三吃

>>:  30天轻松学会unity自制游戏-设定画面按钮

[Day30]检视表、索引实作

在OE的order_items和product_infortation资料表中,依照产品被订购次数由...

区块链与物联网的两人三脚

我抠 我抠 我抠抠抠,"钱歹赚"的2022,我的每一分钱都打上9个结,为了生存时...

Day14 font-family 字型发挥吧

刚开始学习的时候,我在font-family写的值都只会设定一个,完全不知道需要加上通用字型,也不...

[读书笔记] Threading in C# - PART 3: USING THREADS

本篇同步发文於个人Blog: [读书笔记] Threading in C# - PART 3: US...

Google DSC 你也可以!

今天要跟各位介绍一下 Google Developer Community 以及我是如何申请上 Go...