prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

possible to update 2.5.0 to remove warning of lifecycle methods? #968

Closed lidaof closed 3 years ago

lidaof commented 4 years ago

Hi there,

is there possible to upgrade 2.5.0 to remove the warning below? somehow v2 and v3 are very different to use...i tried to upgrade to v3 in my project but just no luck... there is one command fix for this i guess? npx react-codemod rename-unsafe-lifecycles

Thank you in advance!

0.chunk.js:266066 Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount 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: FirebaseConnect(Connect(SessionUI))
prescottprue commented 4 years ago

Haven't done much upkeep of the v2 versions, but it should be easy enough to do. Open to a PR if you get a chance, otherwise I'll try to get to it when I can

prescottprue commented 3 years ago

Forgot to close this, but v2.5.1 switches to the UNSAFE_ versions of the lifecycle methods