salesforce / design-system-react

Salesforce Lightning Design System for React
https://react.lightningdesignsystem.com/
BSD 3-Clause "New" or "Revised" License
909 stars 411 forks source link

JavaScript defaultProps in functional components with newer versions of React (18.3+) #3142

Open VladimirParmonD opened 2 months ago

VladimirParmonD commented 2 months ago

If possible, please update the components so they no longer use soon-to-be-removed default values in functional component props. This relatively small change will help to use the lib while leveraging latest React features. defaultProps can be easily replaced by default parameters. Error is: "Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead."

xulingzhihou commented 1 month ago

yes I have been seeing this issue too. I will take up this issue and try to fix it