I install this library :
npm install react-native-vector-icons
and link it
react native link
and i import it to my project
import Icon from 'react-native-vector-icons/Ionicons'
then i use it in render part of the component like this :
<Icon name={'ios-person-outline'} />
But when i run the android app there is no error but the icon is a qustion icon eny body has idea ?
I used to have similar issues when I started with react-native-vector-icons until I got to understand the different type components.
type="AntDesign"
type="Entypo"
type="FontAwesome"
type="FontAwesome5"
type="FontAwesome5Brands"
type="Foundation"
type="Ionicons"
type="MaterialCommunityIcons"
type="MaterialIcons"
type="SimpleLineIcons"
type="Octicons"
etc...
Icon name "person-outline" can be found under "MaterialIcons" on "https://oblador.github.io/react-native-vector-icons/", so we can do;
<Icon name='person-outline' type="MaterialIcons" />
Hope this explanation helps.
NOTE: Make sure you take the initial steps like;
npm install react-native-vector-icons --save
AND
react-native link react-native-vector-icons
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With