美文网首页
React Native常用的社区库和组件等

React Native常用的社区库和组件等

作者: 小胖子嘿嘿嘿 | 来源:发表于2020-09-28 18:54 被阅读0次

    选择标准:star较多(经过了验证),更新较活跃(很久没更新的一般不用),另外就是没有deparated,在维护状态

    1. 导航和路由
      这个一般是通过react navigation stack来实现的,具体接入方法可参考官网:https://reactnavigation.org/docs/getting-started

    2. md5
      很多时候我们需要验证字符串是否一样,用md5是最合适的方式,我目前用的这个:https://github.com/blueimp/JavaScript-MD5 还比较好用

    3. slider
      官方不支持slider组件,这样要在一个区间里选择一个数值只能借助社区库,我使用的 https://github.com/react-native-community/react-native-slider

    4. 渐变
      渐变效果也是很常用的应用效果,这里我们使用 https://github.com/react-native-community/react-native-linear-gradient

    5. 国际化
      获取用户本地语言设置等: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. 内购
      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. 代码规范
      typescript, prettier等

    4. 路径简化
      babel-plugin-root-import https://github.com/entwicklerstube/babel-plugin-root-import

    5. 全局共享
      react-redux

    相关文章

      网友评论

          本文标题:React Native常用的社区库和组件等

          本文链接:https://www.haomeiwen.com/subject/ewxluktx.html