react-ui-kit / expo-ui-kit

expo-ui-kit - a components based React-Native UI Kit
http://expo-ui-kit.com
MIT License
96 stars 25 forks source link

fix: remove deprecated use of defaultProps for Button, Card, Input, text #83

Closed Verestra closed 1 week ago

Verestra commented 1 month ago

This pull request addresses the removal of deprecated usage of defaultProps in the expo-ui-kit package. The following components have been updated: Button, Card, Input, and Typography (Text).

Changes :

Button Component:

Card Component:

Input Component:

Typography (Text) Component:

Reason for Changes React has deprecated the use of defaultProps for function components starting from version 17. These changes ensure compatibility with React 17 and above by using function parameter defaults instead.

Testing Verified that default values are correctly applied when no props are provided. Tested all components to ensure they function as expected with and without the updated props. Additional Information These changes aim to future-proof the expo-ui-kit package and maintain compatibility with the latest versions of React.

Checklist

Please review the changes and let me know if there are any adjustments or additional improvements needed.

Thanks

wildanrhmn commented 1 month ago

+1 on this issue. Since there are no recent updates from the official expo-ui-kit to resolve this matter yet.

hetmann commented 1 week ago

@Verestra @wildanrhmn PR merged!