iam4x / react-btn-checkbox

React component for displaying checkboxes and radios as button
http://iam4x.github.io/react-btn-checkbox/
25 stars 8 forks source link

React 16 - Cannot call a class as a function #6

Open Vadorequest opened 7 years ago

Vadorequest commented 7 years ago

I just tried to use your lib but it fails. I'm using ES6 import with "react": "16.0.0". Any workaround?

TypeError: Cannot call a class as a function
_classCallCheck
node_modules/react-btn-checkbox/dist/react-btn-checkbox.js:2218
  2215 | 
  2216 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  2217 | 
> 2218 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
  2219 | 
  2220 | function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
  2221 | 

image

alyzidan commented 4 years ago

Same issue, it isn't working !