Closed
Description
I have few components which render()
method encapsulated into mixin.
Like so:
var Mixin = {
render() {
return (
<h1>{ this.prop.header }</h1><div>{ this._renderBody() }</div>
);
}
};
var Comp1 = React.createClass({
mixins: [ Mixin ],
_renderBody() {
return 'comp 1';
}
});
var Comp2 = React.createClass({
mixins: [ Mixin ],
_renderBody() {
return 'comp 2';
}
});
And because of that some rules are ignored (e.g. sort-comp
rule).
So I propose to check when there is no render()
method inside component if the mixins
prop is declared or not.
Metadata
Metadata
Assignees
Labels
No labels