參照dribbble app 學習的react native demo

jopen 9年前發布 | 20K 次閱讀 移動開發 React Native

參照dribbble app 學習的react native demo 原app:https://github.com/catalinmiron/react-native-dribbble-app

在學習的過程中遇到了一些異常,其中有些是因為react-native-dribbble-app中使用的一些組件的方法過時(fb更新快且文檔跟不上)。 有幾個問題解決了,還有幾個沒有解決。

參考圖 參考圖

install

npm install

進入react-native-dribbble-app/ios 目錄打開 resembleDribbble.xcodeproj

command + r

如果遇到Command /bin/sh failed with exit code 127 錯誤

Go into XCode and go to the Build Phases tab. Remove the last item on the list (the one that runs the script),進入Build Phases,刪除 最后一個列表

Android

安卓我還在摸索,沒有參考,學習有點困難。

安卓中我使用了react-native-tabbar,不太理想。

Plugins used:

react-native-icons 原為:React native vector icons 兩者使用方式有不同

如果遇到'Warning: Native component for "FAKIconImage" does not exist' 說明react-native-icons 沒有安裝,請按react-native-icons的說明把字體導入xcode https://github.com/corymsmith/react-native-icons

    {Icon, } = require('react-native-icons')
    <Icon
          name='fontawesome|heart' size={24}
          color='#333' style={styles.icon} //需要一個樣式設置width height />

react-native-parallax-view
//這是一個拖拽時圖片放大的效果插件,原js中有bug,Dimensions模塊react 已經內置,不需要require. 我改動了原文件,注入Dimensions。 請手動進入/node_modules/react-native-parallax-view/lib/ParallaxView.js 注入Dimensions

var {
    StyleSheet,
    View,
    ScrollView,
    Animated,
    Dimensions,
    } = React; // var screen = require('Dimensions').get('window'); var screen= Dimensions.get('window');

react-native-htmlview

項目主頁:http://www.baiduhome.net/lib/view/home/1449999092273

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!