Iconscout / react-unicons

1000+ vector icons as easy to use React Components
https://iconscout.com/unicons
Other
333 stars 39 forks source link

Use ES6 default parameters instead of deprecated defaultProps property #95

Open fnogatz opened 1 month ago

fnogatz commented 1 month ago

As mentioned in https://github.com/Iconscout/react-unicons/issues/86 and https://github.com/Iconscout/react-unicons/issues/64, the current version of the icons results in warnings like the following:

Warning: UilBrushAlt: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

In this PR, we adjust the build/generate.js script which is called on npm run generate, and newly create the icon components.


The work on this PR was sponsored by SUSI&James GmbH.

htoann commented 1 month ago

Please merge as soon as possiable

willibix commented 1 month ago

@tarunmangukiya and @rankarpan please review and merge this. Same update to Iconscout/react-unicons-solid would be aprciated.

fnogatz commented 1 week ago

Fair point, @willibix. I'll happily add the same update to https://github.com/Iconscout/react-unicons-solid as well once this change here gets approved and merged (ping @rankarpan).

dkildar commented 2 days ago

I see approvement, but PR still open. Any updates? @htoann @fnogatz

htoann commented 2 days ago

We need a people who has permission to merge it