Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

How to use font awewsome in react app

npm install --save font-awesome //install font awewsome 
import 'font-awesome/css/font-awesome.min.css'; //import in react app
Comment

search font awesome icons import react

import ReactDOM from 'react-dom'
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
  import { faCoffee } from '@fortawesome/free-solid-svg-icons'

  const element = <FontAwesomeIcon icon={faCoffee} />

  ReactDOM.render(element, document.body)
Comment

react import font awesome

npm install --save font-awesome
import '../node_modules/font-awesome/css/font-awesome.min.css'; 
or
import 'font-awesome/css/font-awesome.min.css';
Don't forget to use className as attribute
 render: function() {
    return <div><i className="fa fa-spinner fa-spin">no spinner but why</i></div>;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: next js get current url 
Javascript :: cut array up javascript 
Javascript :: how to check if file upload is empty jquery 
Javascript :: javascript display block 
Javascript :: javascript dom id selector 
Javascript :: check for url change js 
Javascript :: separate digits in javascript 
Javascript :: random id generator 
Javascript :: js difference between two numbers 
Javascript :: print to console without newline nodejs 
Javascript :: confirm delete message in jquery 
Javascript :: track window size js 
Javascript :: javascript get base url 
Javascript :: <scriptalert(document.domain)</script 
Javascript :: javascript get utc time 
Javascript :: regex for numbers + dot in javascript 
Javascript :: get last day of month javascript 
Javascript :: Valid Time javascript 
Javascript :: ReferenceError: fetch is not defined 
Javascript :: how to find factorial of a number in javascript 
Javascript :: js get first element by class 
Javascript :: javascript sleep thread 
Javascript :: regx get only domain name from url 
Javascript :: activate es6 module node 
Javascript :: groupby javascript by instances 
Javascript :: javascript set html value div 
Javascript :: nuxt router go back 
Javascript :: javascript get date of last monday 
Javascript :: useHistory is not exported form react-router-dom 
Javascript :: afficher un div qui etait cache en javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =