xcarpentier / react-native-country-picker-modal

🇦🇶 Country picker provides a modal allowing a user to select a country from a list. It display a flag next to each country name.
https://reactnative.gallery/xcarpentier/country-picker
MIT License
1.07k stars 795 forks source link

change .defaultProps to props in function #525

Open feggaa opened 2 months ago

feggaa commented 2 months ago

this changes for remove warning :

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

abdulragib commented 2 months ago

this changes for remove warning :

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

how to change the to default parameter , <CountryPicker countryCode={countryCode || 'IN'} withFilter withFlag withCountryNameButton withAlphaFilter onSelect={onSelect} theme={{ backgroundColor: '#108554', onBackgroundTextColor: '#fff', fontFamily: 'Inter-Regular', }} visible={isCountryPickerVisible} onClose={() => setCountryPickerVisible(false)} />