UNPKG

react-codemod

Version:
44 lines (31 loc) 691 B
var React = require('react/addons'); const propTypes = {}; // comment above class class MyComponent extends React.Component { static aStaticThing() { // should come first } static someStaticThing() { // should bundle with other statics } // comment on componentDidMount componentDidMount() { } myOwnMethod(foo) { // comment within method } renderBar() { // should come before renderFoo } renderFoo() { // other render* function } // comment at top of createClass // this will be attached to first method render() { return <div />; } } MyComponent.propTypes = propTypes; /* comment at end */ module.exports = MyComponent;