Configuring FontAwesome Icons

Configuring FontAwesome Icons

Install these

npx expo install react-native-svg
npm i --save @fortawesome/fontawesome-svg-core , --save @fortawesome/free-solid-svg-icons , --save @fortawesome/react-native-fontawesome

Every where you want to use an icon first import

import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'
import { faMugSaucer } from '@fortawesome/free-solid-svg-icons/faMugSaucer'

then use it at any place

<FontAwesomeIcon icon={ faMugSaucer } />

get the icon name from https://fontawesome.com/icons in camel case

Some more features

  <FontAwesomeIcon style={{"color":"red"}} size={22} icon={ faUser } />

Reference https://www.npmjs.com/package/@fortawesome/react-native-fontawesome