saleel / react-native-super-grid

Responsive Grid View for React Native
MIT License
1.43k stars 153 forks source link

Warning: FlatGrid: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead. React Native 0.74.1 #217

Closed kyslyi closed 4 months ago

legend-oe commented 6 months ago

The same issue. " ERROR Warning: FlatGrid: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead "

"expo": "51.0.0" "react": "18.2.0" "react-native": "0.74.1"

Temporary deleted FlatGrid.defaultProps from node_modules/react-native-super-grid/FlatGrid.js and add it props to component on use page.

mrEuler commented 5 months ago

Also have same issue. @saleel 👀

saleel commented 5 months ago

Ok, looks like we need to remove defaultProps and add the default values to the JS object prop during destructuring in the component. Shouldn't break anything for older versions of RN.

Let me know if anyone would like to do a PR.

EssiJunior commented 5 months ago

Hello, I had a similar issue @saleel. Please, how can I fix it ? This is the complete warning message.

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

mohammadlth commented 4 months ago

same issue @saleel

saleel commented 4 months ago

Published version 6.0.1. Can you some please try and update here.

EssiJunior commented 4 months ago

Hello everyone,

@saleel thanks for the fix, Updating to version 6.0.1 worked fine for me.

Command: npm i react-native-super-grid@latest