xotahal / react-native-material-ui

Highly customizable material design components for React Native
MIT License
3.79k stars 609 forks source link

componentWillReceiveProps is deprecated #452

Closed kncerbero closed 5 years ago

kncerbero commented 5 years ago

I receive this warning from my react-native project:

componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.

Please update the following components: CenterElement, IconToggle, LeftElement, Toolbar.

mbrucher commented 5 years ago

Good point, as React will very soon get upgraded to its next major version. Is the project still actively maintained (material-ui got updated to 4.0)? Or is there another similar project that took over?

kncerbero commented 5 years ago

Good point, as React will very soon get upgraded to its next major version. Is the project still actively maintained (material-ui got updated to 4.0)? Or is there another similar project that took over?

never mind, i resolve my problem changing that hook for componentDidUpdate. https://stackoverflow.com/a/51981144

chenop commented 5 years ago

@kncerbero those elements are comopnents inside the react-native-material-ui package. Have you change the code inside the package? if so this should b re-opened so a fix will be made I think.

Dinnu801 commented 4 years ago

@chenop this issue still persists. I tried adding toolbar as my header.

chenop commented 4 years ago

@Dinnu801 this package is not maintained for a long time now - I switched to react-native-elements