Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,16 @@ $1.propTypes = {}

export default $1
```

### `rafc`

```javascript
import React from 'react'

export default () => {
const $1 = () => {
return <div>$0</div>
}

export default $1
```

### `rafce`
Expand Down
20 changes: 11 additions & 9 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@
],
"description": "Creates a React Functional Component with ES7 module system with PropTypes"
},
"reactAnonymousFunctionalExportComponent": {
"prefix": "rafce",
"reactArrowFunctionComponent": {
"prefix": "rafc",
"body": [
"import React from 'react'",
"",
Expand All @@ -328,25 +328,27 @@
"export default ${1:${TM_FILENAME_BASE}}",
""
],
"description": "Creates a React Anonymous Functional Component with ES7 module system"
"description": "Creates a React Arrow Function Component with ES7 module system"
},
"reactAnonymousFunctionalComponent": {
"prefix": "rafc",
"reactArrowFunctionExportComponent": {
"prefix": "rafce",
"body": [
"import React from 'react'",
"",
"export default const ${1:${TM_FILENAME_BASE}} = () => {",
"const ${1:${TM_FILENAME_BASE}} = () => {",
" return (",
" <div>",
" $0",
" </div>",
" )",
"}",
"",
"export default ${1:${TM_FILENAME_BASE}}",
""
],
"description": "Creates a React Anonymous Functional Component with ES7 module system"
"description": "Creates a React Arrow Function Component with ES7 module system"
},
"reactAnonymousFunctionalComponentWithPropTypes": {
"reactArrowFunctionComponentWithPropTypes": {
"prefix": "rafcp",
"body": [
"import React from 'react'",
Expand All @@ -367,7 +369,7 @@
"export default ${1:${TM_FILENAME_BASE}}",
""
],
"description": "Creates a React Functional Component with ES7 module system with PropTypes"
"description": "Creates a React Arrow Function Component with ES7 module system with PropTypes"
},
"reactClassExportComponentWithPropTypes": {
"prefix": "rcep",
Expand Down