Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): remove react-icons/all-files #2803

Closed
wants to merge 1 commit into from

Conversation

thisislawatts
Copy link
Collaborator

@thisislawatts thisislawatts commented Sep 23, 2023

PR Checklist

PR Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Developer experience (improves developer workflows for contributing to the project)

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.

@thisislawatts thisislawatts requested a review from a team as a code owner September 23, 2023 12:02
@thisislawatts thisislawatts force-pushed the fix/deps-remove-react-icons branch 5 times, most recently from 8265883 to f6680b5 Compare September 23, 2023 13:18
@thisislawatts
Copy link
Collaborator Author

Hm… this not be behaving as expected.

@thisislawatts
Copy link
Collaborator Author

Closing due to react-icons/react-icons#154, this will require more time and effort than is currently available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant