Open zkteco-home opened 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' }) => { // ... };
@Inbal-Tish please help fix this problem,it is very easy
why no one fixes it?
you can refer to react-native-paper fix
https://github.com/callstack/react-native-paper/pull/4385/commits/6275a4e394c9416f3c35a3dfdddd81ab9ab948ed
+1
+1
in version 1.1305,very less issue has been fixed,too much problems are there,why no one care about that
Same here any fix?
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