react-native 初学记

1 安装react-native-cli

npm install react-native-cli -g

2 创建项目,需要一些时间

   假如在桌面创建项目 cd ~/desktop 

把[项目名]换成你自己的项目名 react-native init [项目名]

3、cd demo

4、react-native run-android

5 本地访问这个页面:http://localhost:8081/index.android.bundle?platform=android,结果如下所示,代表成功:

猜你喜欢

转载自www.cnblogs.com/homehtml/p/12763482.html
今日推荐