react-native 常用的一些插件

发布时间:2019-06-17 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了react-native 常用的一些插件脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

最近在做react-native的app,用到的一些好用的插件,在这儿记录一下

由于返回的后台内容是富文本编辑器Quill,返回的的是Delta对象,使用了quill-delta-to-htML 插件

https://github.com/nozer/quil...

上传头像,用到了react-native-image-crop-picker,很好用,,需要配置下

react-native-image-crop-picker

https://github.com/react-comm...
clipboard.png

react-native-image-picker
https://github.com/react-comm...

clipboard.png

react-native 常用的一些插件

function uploadImage(url,params){
  return new Promise(function (resolve, reject) {
    let formData = new FormData();
    for (VAR key in params){
      formData.apPEnd(key, params[key]);
    }
    let file = {uri: params.path, type: 'application/octet-stream', name: 'image.jpg'};
    formData.append("file", file);
    fetch(common_url + url, {
      method: 'POST',
      headers: {
        'Content-Type': 'multipart/form-data;charset=utf-8',
        "x-access-token": token,
      },
      body: formData,
    }).then((response) => response.json())
      .then((responseData)=> {
        console.log('uploadImage', responseData);
        resolve(responseData);
      })
      .catch((err)=> {
        console.log('err', err);
        reject(err);
      });
  });

然后redux框架的话,我选择mirror ,流程和redux差不多,但是简化了一些操作,反正挺好用的,详细看文档
https://github.com/mirrorjs/m...

轮播类组件的话,用的是

https://github.com/leecade/re...

图标
react-native-vector-icons

react-native 常用的一些插件

导航跳转
react-navigation

富文本编辑器
react-native-zss-rich-text-editor
大致效果

react-native 常用的一些插件

滑动删除功能组件

react-native-swipeout

react-native 常用的一些插件

视频组件,不过控制界面什么的需要自己去做
react-native-video

https://github.com/react-nati...

选项卡

https://github.com/skv-headle...

动画
https://github.com/oblador/re...

react-native 常用的一些插件

表单验证
https://github.com/gcanti/tco...

react-native 常用的一些插件

滚轮选择器

https://github.com/beefe/reac...

react-native 常用的一些插件

聊天
https://github.com/FaridSafi/...

react-native 常用的一些插件

charts类
https://github.com/wuxudong/r...

react-native 常用的一些插件

下拉放大
https://github.com/lelandrich...

react-native 常用的一些插件

https://github.com/cqm1994617... 可滑动的日历组件

react-native 常用的一些插件

毛玻璃效果
https://github.com/react-nati...

react-native 常用的一些插件

脚本宝典总结

以上是脚本宝典为你收集整理的react-native 常用的一些插件全部内容,希望文章能够帮你解决react-native 常用的一些插件所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。