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.08k stars 801 forks source link

change .defaultProps to props in function #525

Open feggaa opened 5 months ago

feggaa commented 5 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 5 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)} />

islamamrr commented 2 months ago

@xcarpentier please accept this merge request, we're all facing this warning. Thank you in advance!