If you use babel with es6 , it can be rewritten this way (before es5 ):
var MyComponent = (function () { function MyComponent() { _classCallCheck(this, _MyComponent); } _createClass(MyComponent, null, [{ key: 'foo', value: function foo() { return "FOO"; } }]); var _MyComponent = MyComponent; Foo = withStyles(MyComponent) || MyComponent; return MyComponent; })();
So his problem is that withStyles(MyComponent) will return another function that obviously does not have the static methods that you specified for the source class.
source share