React ES.next snippets for Atom
import React, { Component, PropTypes } from 'react';
export class ${1} extends Component {
render() {
return (${2:<div>MyComponent</div>});
}
}
${1}.propTypes = {
};
export default ${1};
import React, { PropTypes } from 'react';
const ${1} = () => {
return (
${2:<div>MyComponent</div>}
);
};
${1}.propTypes = {
};
export default ${1};
import React from 'react';
const ${1} = () => (
${2:<div>MyComponent</div>}
);
export default ${1};
state = { ${1}: ${2} };
${1} = () => {
}
${1}.propTypes = {
${2}
};
${1}.defaultProps = {
${2}
};
${1}: PropTypes.string,
${1}: PropTypes.number,
${1}: PropTypes.object,
${1}: PropTypes.array,
${1}: PropTypes.bool,
${1}: PropTypes.element,
${1}: PropTypes.func,
${1}: PropTypes.node,