Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xabikos committed Oct 29, 2019
2 parents 6229019 + 34ed92a commit 48d41ad
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
"body": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ${1:${TM_FILENAME_BASE}} = props => {\n\treturn (\n\t\t<div>\n\t\t\t\n\t\t</div>\n\t);\n};\n\n${1:${TM_FILENAME_BASE}}.propTypes = {\n\t$0\n};\n\nexport default ${1:${TM_FILENAME_BASE}};",
"description": "Creates a stateless React component with PropTypes and ES6 module system"
},
"reactMemo": {
"prefix": "rm",
"body": "import React, { memo } from 'react';\n\nconst ${1:${TM_FILENAME_BASE}} = memo(() => {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t);\n});\n\nexport default ${1:${TM_FILENAME_BASE}};",
"description": "Creates a stateless React component without PropTypes and ES6 module system"
},
"reactMemoProps": {
"prefix": "rmp",
"body": "import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ${1:${TM_FILENAME_BASE}} = memo((props) => {\n\treturn (\n\t\t<div>\n\t\t\t\n\t\t</div>\n\t);\n});\n\n${1:${TM_FILENAME_BASE}}.propTypes = {\n\t$0\n};\n\nexport default ${1:${TM_FILENAME_BASE}};",
"description": "Creates a stateless React component with PropTypes and ES6 module system"
},
"flowStatelessComponent": {
"prefix": "fsc",
"body": "// @flow \nimport * as React from 'react';\ntype Props = {\n\t$0\n};\nexport const ${1:${TM_FILENAME_BASE}} = (props: Props) => {\n\treturn (\n\t\t<div>\n\t\t\t\n\t\t</div>\n\t);\n};",
Expand Down Expand Up @@ -390,4 +400,4 @@
"body": "function mapDispatchToProps(dispatch) {\n\treturn {\n\t}\n\n}",
"description": "Adds the redux mapDispatchToProps function"
}
}
}

0 comments on commit 48d41ad

Please sign in to comment.