keppelen / react-facebook-login

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

Warning: Unsafe lifecycle methods were found within a strict-mode tree #296

Open akolliy1 opened 4 years ago

akolliy1 commented 4 years ago

Hello,

Firstly, I'm glad to have found this module/package. It reduces a lot of burdens like refresh token and the likes. But, There's a warning bordering me from the package. I just code split the app and migrated to concurrent mode. Probably, that could be the reason the error was thrown.

Secondly, the render props as shown in your npm documentation is not rendering my button component, although, I can still work with the default text that says login with Facebook.

// npm documentation usage
<FacebookLogin
  appId="1088597931155576"
  callback={responseFacebook}
  render={renderProps => (
    <button onClick={renderProps.onClick}>This is my custom FB button</button>
  )}
/>

The error on the browser console

facebook-login2

the ui

facebook3

Dezzymei commented 4 years ago

Duplicate of #264

akolliy1 commented 4 years ago

Ohh okay :), but they're two issues I highlighted. Probably, I may close/rename this, since, the title pointed to unsafe method in strict mode which turns out to be duplicate. Then, I'll account for the second point (ui issue).