babel-plugin-react-import-extends
Version:
Write React Components without worrying to import React and extend component
24 lines (20 loc) • 375 B
JavaScript
import React, {PropTypes, Component} from 'react';
class StatefulComponent extends Component {
componentDidMount() {
console.log('mounted');
}
render() {
return <div className="test">
Hello!
</div>;
}
}
class Person {
constructor() {
this.name = 'vijay';
}
name() {
return this.name;
}
}
export { StatefulComponent, Person };