Closed
Description
First I'd like to just say that I like the new destructuring-assignment
rule because I think it enforces a lot more clarity and explicitness. However I'm having problems with it throwing errors inside of class properties.
class MyComponent extends React.Component {
state = {
value: this.props.defaultValue,
};
...
}
IMO this should be an exception and be totally valid or at least have the option to exclude it just from this use-case. I know that I could move it inside a constructor
and destructure it there but I'd rather not do that.