0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[React Native]ReactNativeの開発環境を expoでつくる

Posted at

React native 環境構築

最近React Nativeを学習する機会があったのでメモ

expoを利用して環境を作る

初めてReact Nativeやる人はexpoでちゃちゃっと作ったほうがいいと思いました。
他にもいろんなやり方があるみたいですが、個人的にはexpoがおすすめ。

必要なもの

npmとnode

npmとnodeが自分のPCに入っているか確認する。

  • npmの確認
$ npm --version
6.14.4
  • nodeの確認
$ node --version
v14.4.0

早速インストール

といってもexpoは以下のコマンド一つでOK

$ npm install expo-cli --global
$ expo --version
3.22.3

expoプロジェクトの作成

$ expo init アプリ名
$ expo init ReactNativeApp

このコマンド一つでReactNativeのプロジェクトを作ってくれる。

expoの起動

$ expo start

でQRコードが出力されるので、それをスマホのカメラで読み込むと実機確認ができる。(Expoアプリ必要なのでスマホでインストールしておかないといけません)
尚且つホットリロードなのでUIを確認しつつ開発できる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?