Skip to content
Closed
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ React 17 is currently supported by `_` prefix.
| ----------: | ----------------------------------------------------------------------------------- |
| `imr→` | `import React from 'react'` |
| `imrd→` | `import ReactDOM from 'react-dom'` |
| `imrrd→` | `import React from 'react' & import ReactDOM from 'react-dom'` |
| `imrc→` | `import React, { Component } from 'react'` |
| `imrcp→` | `import React, { Component } from 'react' & import PropTypes from 'prop-types'` |
| `imrpc→` | `import React, { PureComponent } from 'react'` |
Expand Down Expand Up @@ -216,7 +217,7 @@ React 17 is currently supported by `_` prefix.
### Console

| Prefix | Method |
|--------|--------------------------------------------------------------|
| ------ | ------------------------------------------------------------ |
| `clg→` | `console.log(object)` |
| `clo→` | `` console.log(`object`, object) `` |
| `clj→` | `` console.log(`object`, JSON.stringify(object, null, 2)) `` |
Expand Down
8 changes: 8 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@
"prefix": "imr",
"body": ["import React from 'react'", ""]
},
"import React & ReactDOM": {
"prefix": "imrrd",
"body": [
"import React from 'react'",
"import ReactDOM from 'react-dom'",
""
]
},
"import ReactDOM": {
"prefix": "imrd",
"body": ["import ReactDOM from 'react-dom'", ""]
Expand Down