Skip to content

Instantly share code, notes, and snippets.

@jim-at-jibba
Created September 21, 2016 07:41
Show Gist options
  • Save jim-at-jibba/49fc307e1e7676637f95b37864b2eb2a to your computer and use it in GitHub Desktop.
Save jim-at-jibba/49fc307e1e7676637f95b37864b2eb2a to your computer and use it in GitHub Desktop.
React Stateless Component Webstorm/PHPStorm File Template
import React, { PropTypes } from 'react';
const $NAME = (props) => {
return (
$END
);
}
$NAME.propTypes = {
// myProp: PropTypes.string.isRequired
};
export default $NAME;
@clovisdasilvaneto
Copy link

clovisdasilvaneto commented Dec 31, 2017

Add space in this line:
$NAME .propTypes = { // myProp: PropTypes.string.isRequired };
Because webstorm ignores the filename when the $NAME variable is followed by same characters without spaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment