fix(deps): remove react-icons/all-files #2803
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
PR Type
Description
The @react-icons/all-files and react-icons are both related to the react-icons library, which provides icons for React projects. The icons in this library come from various sources like Font Awesome, Material Design, and more.
However, there are reasons to consider not using @react-icons/all-files and to use react-icons directly instead:
Bundle Size:
Importing icons from @react-icons/all-files can potentially lead to larger bundle sizes because it contains every icon from the various icon libraries it supports. This can significantly bloat the size of your JavaScript bundle if not used judiciously.
On the other hand, with react-icons, you can import only the icons you need, ensuring your bundle remains as lightweight as possible.
Easier to Use with Tree Shaking:
Modern bundlers like Webpack and tools like Create React App support tree shaking, which removes unused code from the final bundle. When you use react-icons and import only the icons you need, tree shaking is more efficient.
Better Developer Experience:
It's more intuitive to import only what you need. When using react-icons, you can directly import from specific libraries like react-icons/fa (Font Awesome), react-icons/md (Material Design), and so on. This makes it clear which icon set you are using and can be more maintainable in the long run.
Performance:
Loading unnecessary icons can affect the performance of your app. By only loading the icons we need, you ensure faster load times for your users.