React Native常用的社區(qū)庫和組件等

選擇標(biāo)準(zhǔn):star較多(經(jīng)過了驗證),更新較活躍(很久沒更新的一般不用),另外就是沒有deparated,在維護(hù)狀態(tài)

  1. 導(dǎo)航和路由
    這個一般是通過react navigation stack來實現(xiàn)的,具體接入方法可參考官網(wǎng):https://reactnavigation.org/docs/getting-started

  2. md5
    很多時候我們需要驗證字符串是否一樣,用md5是最合適的方式,我目前用的這個:https://github.com/blueimp/JavaScript-MD5 還比較好用

  3. slider
    官方不支持slider組件,這樣要在一個區(qū)間里選擇一個數(shù)值只能借助社區(qū)庫,我使用的 https://github.com/react-native-community/react-native-slider

  4. 漸變
    漸變效果也是很常用的應(yīng)用效果,這里我們使用 https://github.com/react-native-community/react-native-linear-gradient

  5. 國際化
    獲取用戶本地語言設(shè)置等:react native locale, https://github.com/zoontek/react-native-localize
    本地多語言:i18n-js https://github.com/fnando/i18n-js

  6. 廣告接入
    react-native-admob: https://github.com/sbugert/react-native-admob

  7. 內(nèi)購
    react-native-iap 擬采用這個,https://github.com/dooboolab/react-native-iap,尚未驗證

  8. 上報
    接友盟,https://developer.umeng.com/docs/66632/detail/67587,這個文檔比較簡略,還在研究中

一些其他的

  1. debugger工具
    rndebugger,https://github.com/jhen0409/react-native-debugger/blob/master/docs/getting-started.md

  2. 代碼檢查
    eslint

  3. 代碼規(guī)范
    typescript, prettier等

  4. 路徑簡化
    babel-plugin-root-import https://github.com/entwicklerstube/babel-plugin-root-import

  5. 全局共享
    react-redux

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。