rendinjast / iconsax-react

ICONSAX for React and React Native ✌️
https://iconsax-react.pages.dev/
MIT License
243 stars 30 forks source link

Icons not displaying correctly in React 19 / Next.js 15 due to reliance on removed `defaultProps` #18

Open priyanshuraj24 opened 3 weeks ago

priyanshuraj24 commented 3 weeks ago

After updating to React 19, react-iconsax icons no longer display correctly without explicitly specifying size and color. This is due to React 19’s removal of defaultProps for functions, which react-iconsax relied on to set these default values. The React 19 Upgrade Guide highlights this change: https://19.react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops

Setting size and color="currentColor" directly on each icon restores visibility:

<Profile size={24} color="currentColor" />

This process, however, is time-consuming in large codebases where react-iconsax icons are used extensively.

rendinjast commented 3 weeks ago

since the original creator of iconsax abandoned the project there is no reason working on this library. plus I dont have access to my old npm account so I cannot update it there.

but I see a lots of people are using this package, so I might fix those issues and publish new one.