Preact and property descriptors
This makes sure Preact works and also makes it so properties specified by Component.propTypes
are going to return a property descriptor.
For example:
class Greeting extends React.Component { }
Greeting.propTypes = {
name: PropTypes.string.isRequired
};
var MyGreeting = reactToWebComponent(Greeting, React, ReactDOM)
customElements.define("my-greeting", MyGreeting);
var myGreeting = new MyGreeting();
Object.getOwnPropertyDescriptor( myGreeting.prototype, "name" ) //-> {writable: true}
This was important for CanJS so it could know that the property was writable.