自娛自樂RN版小說APP歷程記錄
阿新 • • 發佈:2019-02-27
網頁 spa 一個 sudo clas 輕量 cto -html class
通過react-native-cli初始化項目
1 npm i -g react-native-cli 2 react-native init <項目名稱>
如果mac第一步報錯,則需要加sudo。
安裝一些必要的npm包
- react-navigation
1 yarn add react-navigation 2 yarn add react-native-gesture-handler 3 react-native link react-native-gesture-handler
react-navigation是官方推薦的導航工具,當前版本是3.x 官方要求安裝react-native-gesture-handler,並且引入所有的原生依賴
- react-native-vector-icons
yarn add react-native-vector-icons react-native link react-native-vector-icons
react-native-vector-icons是一個強大的圖標庫,看看都有啥圖標
- react-native-scrollable-tab-view
yarn add react-native-scrollable-tab-view
這是一款常用的滑動tab組件。
-
react-native-htmlview
yarn add react-native-htmlview
非常輕量的顯示網頁的組件,比原生的webview要輕。
自娛自樂RN版小說APP歷程記錄