xxxxxxxxxx
import { FaReact } from 'react-icons/fa';
const MyComponent = () => {
return (
<div>
<h1>React Icon</h1>
<FaReact size={50} />
</div>
);
};
export default MyComponent;
react icon
xxxxxxxxxx
import { FaBeer } from 'react-icons/fa';
class Question extends React.Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
xxxxxxxxxx
// ###### Installation ######
npm install react-icons --save
// ###### Usage ######
import { FaBeer } from 'react-icons/fa';
class Question extends React.Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
xxxxxxxxxx
Installation (for standard modern project)
npm install react-icons --save
yarn add react-icons --save
// or
yarn add react-icons
Installation (for meteorjs, gatsbyjs, etc)
npm install @react-icons/all-files --save
xxxxxxxxxx
npm install react-icons --save
import { FaBeer } from 'react-icons/fa';
<FaBeer />