Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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';
Comment

react native vector icon

import Icon from 'react-native-vector-icons/FontAwesome';
const myIcon = <Icon name="rocket" size={30} color="#900" />;
Comment

icon shwoing a box react native vector icons

In 'android/app/build.gradle' (not in android/build.gradle),

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

Then,
react-native link react-native-vector-icons 
react-native run-android
react-native start
Comment

react native vector icons

# With yarn
yarn add react-native-vector-icons
# With npm : npm i react-native-vector-icons
# In android go to android/app/build.gradle file add following line 
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
# In ios install required pods
npx pod-install
# Import
import FontAwesome from 'react-native-vector-icons/FontAwesome';
# Use
<FontAwesome name="rocket"  />
Comment

react native vector icons link

react-native link react-native-vector-icons
Comment

react-native-vector-icons

import Icon from 'react-native-vector-icons/FontAwesome';

const myIcon = <Icon name="rocket" size={30} color="#900" />;
Comment

@types/react-native-vector-icons

# Add types for react-native-vector-icons with npm
npm i --save-dev @types/react-native-vector-icons
# With yarn
yarn add --dev @types/react-native-vector-icons
Comment

react native vector icons

yarn add react-native-vector-icons
Comment

how to use react-native-vector-icons

<Icon name="rocket" size={30} color="#900" />
Comment

react native add react native vector icons not working

project.ext.vectoricons = [
    iconFontNames: [ 'MaterialIcons.ttf', 'FontAwesome.ttf', 'MaterialCommunityIcons.ttf', 'Ionicons.ttf'] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Comment

react native vector icons

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
Comment

vector icons react native

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Comment

PREVIOUS NEXT
Code Example
Javascript :: base 2 number javascript 
Javascript :: difference let and var 
Javascript :: nodejs process code 
Javascript :: jquery data 
Javascript :: javaScript setMinutes() Method 
Javascript :: prependchild javascript 
Javascript :: windows scroll condition 
Javascript :: show and hide div based on radio button click react 
Javascript :: how to make a post request from axios 
Javascript :: bootstrap 4 modal popup remote url 
Javascript :: Difference in months between two dates in Javascript 
Javascript :: get user agent in js 
Javascript :: how assign custom date to input type date in javascript 
Javascript :: useScroll 
Javascript :: react got error need to enable javascript 
Javascript :: Alpinejs notification 
Javascript :: js add class to html 
Javascript :: counting duplicate values javascript 
Javascript :: react native font awesome 
Javascript :: node check if internet 
Javascript :: find max value in array javascript 
Javascript :: how to apply border to table in angular 
Javascript :: how to select an element in javascript 
Javascript :: dynamic button click event in jquery 
Javascript :: JavaScript try...catch in setTimeout 
Javascript :: javascript find matching elements in two arrays 
Javascript :: trigger keyboard event javascript 
Javascript :: gsap scrolltrigger 
Javascript :: get current location city name react native 
Javascript :: dynamically add/remove rows in html table using javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =