react-native 經常使用的一些插件

最近在作react-native的app,用到的一些好用的插件,在這兒記錄一下html

因爲返回的後臺內容是富文本編輯器Quill,返回的的是Delta對象,使用了quill-delta-to-html 插件react

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

上傳頭像,用到了react-native-image-crop-picker,很好用,,須要配置下github

react-native-image-crop-pickerjson

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

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

clipboard.png
clipboard.png

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...app

輪播類組件的話,用的是框架

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

圖標
react-native-vector-icons

clipboard.png

導航跳轉
react-navigation

富文本編輯器
react-native-zss-rich-text-editor
大體效果

clipboard.png

滑動刪除功能組件

react-native-swipeout

圖片描述

視頻組件,不過控制界面什麼的須要本身去作
react-native-video

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

選項卡

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

動畫
https://github.com/oblador/re...

圖片描述

表單驗證
https://github.com/gcanti/tco...

clipboard.png

滾輪選擇器

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

clipboard.png

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

clipboard.png

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

clipboard.png

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

clipboard.png

https://github.com/cqm1994617... 可滑動的日曆組件

clipboard.png

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

clipboard.png

相關文章
相關標籤/搜索