Skip to content

Commit 3308e8b

Browse files
selrondDamian Sznajder
authored and
Damian Sznajder
committed
add prop-types import snippet
1 parent ad0da95 commit 3308e8b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Every space inside `{ }` and `( )` means that this is pushed into next line :)
5858
| `imrcp→` | `import React, { Component } from 'react' & import PropTypes from 'prop-types'` |
5959
| `imrpc→` | `import React, { PureComponent } from 'react'` |
6060
| `imrpcp→` | `import React, { PureComponent } from 'react' & import PropTypes from 'prop-types'` |
61+
| `impt→` | `import PropTypes from 'prop-types'` |
6162
| `redux→` | `import { connect } from 'react-redux'` |
6263
| `rconst→` | `constructor(props) with this.state` |
6364
| `rconc→` | `constructor(props, context) with this.state` |

snippets/snippets.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@
202202
""
203203
]
204204
},
205+
"import PropTypes": {
206+
"prefix": "impt",
207+
"body": [
208+
"import PropTypes from 'prop-types'",
209+
""
210+
]
211+
},
205212
"import redux statement": {
206213
"prefix": "redux",
207214
"body": ["import { connect } from 'react-redux'", ""]

0 commit comments

Comments
 (0)