add icon react native code example

Example 1: react native get location

npm i -S react-native-get-location

Example 2: react native vector icons

1-npm install --save react-native-vector-icons
2-Edit android/app/build.gradle : (add below code)
    apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
3-Edit android/settings.gradle : (add below codes)
	+ include ':react-native-vector-icons'
	+ project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
4-Edit android/app/build.gradle : (add below code to dependencies)
    dependencies {
    ...
    compile project(':react-native-vector-icons')
}
5-import fontawesome to App.js :
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';

Example 3: react native add custom fonts

// create a folder in your root directory /assets/fonts/ 
// paste the custom fonts you want used in that folder
// create a file in the root called react-native.config.js
// Then add the following:

module.exports = {
  project: {
    ios: {},
    android: {},
  },
  assets: ['./assets/fonts'],
};

// then run 

react-native link