Open yuchuan1 opened 5 years ago
I get the same error with the example code. When I convert the example button from using a stateless component to extending React.Component, it works.
I need to be able to use react hooks.
@yuchuan1 hey did you get solution to this? I am facing the same issue.
@devapurva Since my new project only requires fb and google, I moved away from using this module.
So basically its broken.. :/
@towfiqi Someone gotta dig into the code and figure out a solution
@yuchuan1, @jangsi so basically it's brokes when you use React Hooks or Functional Component, is that what happens?
It doesn't work with class components too.
@towfiqi okay
I get the same error with the example code. When I convert the example button from using a stateless component to extending React.Component, it works.
guys just read this :) instead of using a stateless component create a class extending React.Component, just don't be lazy
Something like ` class SocialLoginButton extends React.Component {
render() {
return (
<Button onClick={this.props.triggerLogin} {...this.props}>
{ this.props.children }
</Button>
);
}
}
export default SocialLogin(SocialLoginButton); ` Works like a charm! I'm using semantic ui, so maybe you want to replace Button with button
any updates for hooks?
Still not usable with a functional component.
Can someone share a codesabdbox or similar demo for this issue? thanks
this is state issue, when everything is ready just show the socialbutton
Sample repo Steps to reproduce.
in Chrome, it shows error messages as following.
in Firefox, the error message is as following.