Iconscout / react-native-unicons

Unicons - 1000+ vector icons as easy to use vector React Native Components
Other
24 stars 13 forks source link

Provide Icon component #14

Open joeyfigaro opened 4 years ago

joeyfigaro commented 4 years ago

It'd be great if there were an Icon component that used a name prop to render the appropriate icon. I'm using react-native-paper in a current project and the best way to override the icon library they're using is to provide a function that returns a single component that represents/provides access to the entire set of icons.

tarunmangukiya commented 4 years ago

Hi @joeyfigaro,

Thank you for your suggestion. I think we can do it.

Actually this library is been derived from our react-unicons package, and in that, we are more concerned about bundle size. Also, I think you can use it by importing full package: https://github.com/Iconscout/react-native-unicons#usage-as-full-package. What are your views wrt Bundle Size and Full Package usage?

I am open for your suggestions. šŸ‘

joeyfigaro commented 4 years ago

@tarunmangukiya Thanks for the quick reply! I apologize for being so late to the party. I personally don't have any concerns of impact on bundle size for the project that brought me hereā€”not for icons, anyway. It's at a point where we're painting with pretty broad strokes and will end up shaving down resources down the road.

From personal experience with icon libraries and react native, I'd much rather have an entire library available to me while in the height of development so I can forget about dealing with asset configuration after I do initial setup. Asset optimization for me ends up becoming part of my focus after the application is being tested.