wix / react-native-calendars

React Native Calendar Components 🗓️ 📆
MIT License
9.33k stars 2.9k forks source link

ExpandableCalendar error under React native 0.74 #2455

Open zkteco-home opened 2 months ago

zkteco-home commented 2 months ago

today i upgraded my app to react native 0.74 and i got the following error:

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

This warning message indicates that your code is using a deprecated way of setting default values for props in React functional components

### Tasks
zkteco-home commented 2 months ago

JavaScript // Before (using defaultProps) const MyComponent = ({ prop1, prop2 }) => { prop1 = prop1 || 'default value 1'; prop2 = prop2 || 'default value 2'; // ... };

MyComponent.defaultProps = { prop1: 'default value 1', prop2: 'default value 2', };

// After (using JavaScript default parameters) const MyComponent = ({ prop1 = 'default value 1', prop2 = 'default value 2' }) => { // ... };

zkteco-home commented 2 months ago

@Inbal-Tish please help fix this problem,it is very easy

zkteco-home commented 2 months ago

image

zkteco-home commented 2 months ago

why no one fixes it?

zkteco-home commented 2 months ago

you can refer to react-native-paper fix
https://github.com/callstack/react-native-paper/pull/4385/commits/6275a4e394c9416f3c35a3dfdddd81ab9ab948ed

henry-north-loop commented 1 month ago

+1

tsuyoshily commented 1 month ago

+1

zkteco-home commented 1 month ago

in version 1.1305,very less issue has been fixed,too much problems are there,why no one care about that

Kiran178 commented 1 month ago

image

Same here any fix?