1雪侥、iOS中集成RN ?
https://reactnative.cn/docs/getting-started.html
http://www.reibang.com/p/798684be04f4
2、React Native與iOS原生交互
http://www.reibang.com/p/5f5c50638b2e
3精绎、創(chuàng)建不同的RN項(xiàng)目?https://blog.csdn.net/niuba123456/article/details/81879750
1速缨、先在終端里新建一個(gè)RN項(xiàng)目
#假如在桌面創(chuàng)建項(xiàng)目cd~/desktop
#創(chuàng)建項(xiàng)目,需要一些時(shí)間代乃,把[項(xiàng)目名]換成你自己的項(xiàng)目名
react-native init [項(xiàng)目名]
初始化的時(shí)候報(bào)錯(cuò)You are currently running Node v6.11.0 but React Native requires >=8.3. Please use a supported version of Node.提示版本太低那么我們就更新node旬牲,更新命令
一種方式是嘗試更新 brew install node
二種是創(chuàng)建創(chuàng)建低版本的。提示:你可以使用--version參數(shù)(注意是兩個(gè)杠)創(chuàng)建指定版本的項(xiàng)目搁吓。例如react-native init MyApp --version 0.44.3原茅。注意版本號(hào)必須精確到兩個(gè)小數(shù)點(diǎn)。