You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67-4Lines changed: 67 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -588,7 +588,69 @@ You can now update imports:
588
588
589
589
> Furthermore, don't add the `output.clean` option in webpack configuration, it will prevent React components from hot reloading. For more information, take a look at the [issue](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/595) I opened on the connector plugin repository.
590
590
591
-
## Testing with Jest
591
+
## Use FontAwesome icons
592
+
593
+
There are a few ways to add FontAwesome to a project. The following is the best way as only the icons used will be included in the build.
594
+
595
+
- add fontawesome svg core
596
+
597
+
```sh
598
+
npm i --save @fortawesome/fontawesome-svg-core
599
+
```
600
+
601
+
- install icon styles you need
602
+
603
+
```sh
604
+
npm i --save @fortawesome/free-solid-svg-icons
605
+
# npm i --save @fortawesome/free-brands-svg-icons
606
+
# npm i --save @fortawesome/free-regular-svg-icons
607
+
```
608
+
609
+
- install FontAwesome React component
610
+
611
+
```sh
612
+
npm i --save @fortawesome/react-fontawesome@latest
> We choose [Airbnb rules preset](https://github.com/airbnb/javascript) for our project
713
775
@@ -780,7 +842,7 @@ You can now update imports:
780
842
781
843
> You can download the ESLint plugin of your favorite IDE [here](https://eslint.org/docs/user-guide/integrations#editors), so that you don't have to run the lint script every time.
782
844
783
-
## Formatter (Prettier)
845
+
## Format your code withPrettier
784
846
785
847
### No [integration with ESLint](https://prettier.io/docs/en/integrating-with-linters) wanted. Why ?
786
848
@@ -956,4 +1018,5 @@ We have to build the app and push the content of the build directory to a new br
956
1018
- [Prevent missing React when using JSX](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md)
957
1019
- [Utiliser ESLint et Prettier pour un code de qualité](https://jeremiechazelle.dev/utiliser-eslint-et-prettier-sous-visual-studio-code-webstorm-phpstorm-pour-un-code-de-qualite)
958
1020
- [How to setup ESLint and Prettier for your React apps](https://thomaslombart.com/setup-eslint-prettier-react)
959
-
- [How do I force git to use LF instead of CR+LF?](https://stackoverflow.com/a/42136008/16072226)
1021
+
- [How do I force git to use LF instead of CR+LF?](https://stackoverflow.com/a/42136008/16072226)
1022
+
- [Set Up FontAwesome with React](https://fontawesome.com/docs/web/use-with/react)
0 commit comments