gaearon / react-side-effect

Create components whose nested prop changes map to a global side effect
MIT License
1.22k stars 75 forks source link

Doesn't work with ES6 classes. #65

Open dangreen opened 4 years ago

dangreen commented 4 years ago

https://unpkg.com/browse/react-side-effect@2.1.0/lib/index.es.js line 68:

return _PureComponent.apply(this, arguments) || this;

If _PureComponent is ES6 class then we have TypeError: Class constructor PureComponent_PureComponent cannot be invoked without 'new'.

dangreen commented 4 years ago

react was replaced with preact sources.

This is not a standard case, but maybe you can add source file into package too?