运行以下命令:
yarn add react-native-vector-icons
react-native link react-native-vector-icons
示例:
import React,{Component} from 'react'
import {View,Text} from 'react-native'
import Ionicons from 'react-native-vector-icons/Ionicons'
export default class Welcome extends Component{
render(){
return <View>
<Text>Welcome</Text>
<Ionicons name={'ios-airplane'} size={26} style={{color:'#f00'}}/>
</View>
}
}