Skip to content

Commit

Permalink
Update the triggers for memo stateless components to be alligned with…
Browse files Browse the repository at this point in the history
… the rest of the snippers
  • Loading branch information
xabikos committed Oct 29, 2019
1 parent 48d41ad commit e1f5e7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Below is a list of all available snippets and the triggers of each one. The **
| `rpc→` | class pure component skeleton with prop types after the class |
| `rsc→` | stateless component skeleton |
| `rscp→` | stateless component with prop types skeleton |
| `rscm→` | memoize stateless component skeleton |
| `rscpm→` | memoize stateless component with prop types skeleton |
| `rsf→` | stateless named function skeleton |
| `rsfp→` | stateless named function with prop types skeleton |
| `rsi→` | stateless component with prop types and implicit return |
Expand Down
8 changes: 4 additions & 4 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
"description": "Creates a stateless React component with PropTypes and ES6 module system"
},
"reactMemo": {
"prefix": "rm",
"prefix": "rscm",
"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"
"description": "Creates a memoized stateless React component without PropTypes and ES6 module system"
},
"reactMemoProps": {
"prefix": "rmp",
"prefix": "rscpm",
"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"
"description": "Creates a memoized stateless React component with PropTypes and ES6 module system"
},
"flowStatelessComponent": {
"prefix": "fsc",
Expand Down

0 comments on commit e1f5e7c

Please sign in to comment.