greena13 / react-hotkeys

Declarative hotkey and focus area management for React
https://github.com/greena13/react-hotkeys
ISC License
2.15k stars 161 forks source link

[BUG] Fix depreciation warnings for 1.x version #278

Open erik-sytnyk opened 4 years ago

erik-sytnyk commented 4 years ago

Describe the bug Deprecation warnings are shown for the newer version of React for version 1.x:

"Rename componentWillMount to UNSAFEcomponentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder. Please update the following components: HotKeys, SideEffect(NullComponent)"

We do use the 1.x version of the library in our project and it is not straight forward to upgrade to 2.x would you consider an update for 1.x with renamed lifecycles methods. Happy to provide PR.

Expected behavior Update 1.x version, so no warnings are shown

Are you willing and able to create a PR request to fix this issue? Yes