Kureev / react-native-side-menu

Side menu component for React Native
MIT License
2.21k stars 436 forks source link

Updated methods componentWillMount / componentWillReceiveProps #384

Closed LuigiQuarta closed 4 years ago

LuigiQuarta commented 4 years ago

The methods componentWillMount and componentWillReceiveProps are now called with their new aliases: UNSAFE_componentWillMount and UNSAFE_componentWillReceiveProps, in this way the deprecation warning doesn't appears and the library will work in react 17.0 too. For more info about the change see: https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path

Test Plan

Commands:

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android

Checklist

LuigiQuarta commented 4 years ago

It's just a little update in the methods name to remove the deprecation warning while debugging. The code will work in React 17.0 too now.

nickineering commented 4 years ago

Would love to see this merged!

FrancoisDeBellescize commented 4 years ago

This is just to avoid warning, there is no changes. Need this merge too

kking937 commented 4 years ago

This needs to be merged

chakrihacker commented 4 years ago

Hey @LuigiQuarta thanks for the PR, I think it breaks for the devs who use react version less than 16.3. what are your thoughts??

LuigiQuarta commented 4 years ago

Hi @chakrihacker thanks for the reply, devs who use older versions can still use the library in blocking the npm version to the current one. A complete update of the library probably will include some hooks too so, if they don't update their React version, they will encounter this issue anyway.

Santo-dev commented 4 years ago

Hi, I still have the corresponding warnings despite the fact I just installed the package through "npm install react-native-side-menu --save". I am using expo-cli 3.17.23.

Thank you very much for your help.

LuigiQuarta commented 4 years ago

Hi the fix is in the master now but it wasn't released on NPM yet, the last version on NPM is the 1.1.3 that doesn't contain the fix