keppelen / react-facebook-login

A Component React for Facebook Login
1.18k stars 406 forks source link

will remove Warning: componentWillReceiveProps has been renamed #283

Closed mfaizan1 closed 4 years ago

mfaizan1 commented 4 years ago

renamed componentWillReceiveProps in facebook.js and created new dist

this will handle

react-dom.development.js:12449 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps 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: t

If there is any problem please let me know in comments would love to improvise and contribute

mfaizan1 commented 4 years ago

can any senior guide me how to move from here and make this work ?

Identifier 'UNSAFE_componentWillReceiveProps' is not in camel case

there is no way to bypass that except disabling rule

UNSAFE_componentWillReceiveProps should be placed after setFbAsyncInit

should i move the functions ?

Joaquim-Ferrer commented 4 years ago

It would be great to fix this.

heinthanth commented 4 years ago

298 please review my commit.