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:
Removed defaultProps.
Added default values directly in the function parameters.
Card Component:
Removed defaultProps.
Added default values directly in the function parameters.
Input Component:
Removed defaultProps.
Added default values directly in the function parameters.
Typography (Text) Component:
Removed defaultProps.
Added default values directly in the function parameters.
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
Removed defaultProps in all specified components :white_check_mark:
Verified that default values are applied correctly :white_check_mark:
Tested components to ensure functionality is retained :white_check_mark:
Updated documentation/comments where necessary :white_check_mark:
Please review the changes and let me know if there are any adjustments or additional improvements needed.
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