communityconnect
communityconnect copied to clipboard
Font Awesome Icon Local Library
we can increase the performance in this area by importing only the icons we plan to use at the root level instead of importing the entire FA icon library
current index.js
library.add(fab, fas);
this add all the icons from the font-awesome basic and font-awesome solid libraries which is a lot to import. we can individually import the icons and that will help with performance
link to use an example: https://scotch.io/tutorials/using-font-awesome-5-with-react#toc-creating-an-icon-library
// import the library
import { library } from '@fortawesome/fontawesome-svg-core';
// import your icons
import { faMoneyBill } from '@fortawesome/pro-solid-svg-icons';
import { faCode, faHighlighter } from '@fortawesome/free-regular-svg-icons';
library.add(
faMoneyBill,
faCode,
faHighlighter
// more icons go here
);