美文网首页
react-native学习总结

react-native学习总结

作者: 读书的鱼 | 来源:发表于2019-06-26 21:15 被阅读0次
npm install react-navigation -S  //导航路由
npm install react-native-vector-icons -S //图标库
npm install rnpm -S

运行在什么型号的iphone

react-native run-ios --simulator="iPhone X"

Android和IOS区分:

import {Platform, StyleSheet, Text, View} from 'react-native';
const instructions = Platform.select({
    ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
    android:
        'Double tap R on your keyboard to reload,\n' +
        'Shake or press menu button for dev menu',
});

icon的应用:

import Icon from 'react-native-vector-icons/Ionicons'

<Icon name="ios-medical"/>
<Icon name="ios-arrow-round-back" size={40}/>

常见问题汇总
https://github.com/facebook/react-native/issues/14118
react-native upgrade

相关文章

网友评论

      本文标题:react-native学习总结

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