Open Kif11 opened 5 years ago
Hmm, I build the project without webpack Uglify plugging. It is failing on the last line of this snippet:
/**
* React Higher Order Component handling social login for multiple providers.
* @param {Element} WrappedComponent
* @constructor
*/
var SocialLogin = function SocialLogin(WrappedComponent) {
var _class, _temp;
return _temp = _class = function (_Component) {
_inherits(SocialLogin, _Component);
function SocialLogin(props) {
_classCallCheck(this, SocialLogin);
var _this = _possibleConstructorReturn(this, (SocialLogin.__proto__ || Object.getPrototypeOf(SocialLogin)).call(this, props));
_this.isStateless = !WrappedComponent.prototype.render;
@deepakaggarwal7 any ideas?
There are a few issues mentioning that the component doesn't work as functional component as prototype isn't supported. Will check more.
I'm trying to test one of my components with Jest that use SocialButton. Set up is exactly in provided example.
I'm getting this error. Any ideas what can be wrong?
TypeError: Cannot read property 'render' of undefined
I think, this is happening because
react-social-login/dist/social-login.js
in NPM distribution is minified.