반응형
fontawesome을 component 단위로 사용 할 수 있지만, html사용하듯이 사용하는 법도 있기에 작성해 본다.
터미널에서 해당 프로젝트 파일로 경로를 열고
yarn add @fortawesome/fontawesome-free 혹은
npm add @fortawesome/fontawesome-free 입력하여 다운받아 준다.
그 후 index.js 에 들어가 위와 같이 import한 후 각 components파일에 들어가 html코드 입력해주면 사용할 수 있다.
반응형
'develop > react' 카테고리의 다른 글
[REACT] Firebase 연동 및 사용하기 [1] (0) | 2021.08.29 |
---|---|
[REACT] REACT-Icons 사용하기 (0) | 2021.08.26 |
[REACT] Uncaught Error: Objects are not --- valid as a React child (found: object with keys {current}). If you meant to render a collection of children, use an array instead. (0) | 2021.08.25 |
[REACT] 글씨 타이핑 효과 내기 (0) | 2021.08.23 |
[REACT] Chart legend position 오류 (0) | 2021.07.16 |
댓글