Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExpandableCalendar error under React native 0.74 #2455

Open
zkteco-home opened this issue Apr 23, 2024 · 9 comments
Open

ExpandableCalendar error under React native 0.74 #2455

zkteco-home opened this issue Apr 23, 2024 · 9 comments

Comments

@zkteco-home
Copy link

zkteco-home commented Apr 23, 2024

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

No tasks being tracked yet.
@zkteco-home
Copy link
Author

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
Copy link
Author

zkteco-home commented Apr 24, 2024

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

@zkteco-home
Copy link
Author

image

@zkteco-home
Copy link
Author

why no one fixes it?

@zkteco-home
Copy link
Author

you can refer to react-native-paper fix
callstack/react-native-paper@6275a4e

@henry-north-loop
Copy link

+1

1 similar comment
@tsuyoshily
Copy link

+1

@zkteco-home
Copy link
Author

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

@Kiran178
Copy link

image

Same here any fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants