Last active
January 30, 2022 20:59
-
-
Save cray0000/0df2b145e1acee13ba4781aeae669b81 to your computer and use it in GitHub Desktop.
Startupjs snippets for VS Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Console Log": { | |
"prefix": "log", | |
"body": "console.log($1)" | |
}, | |
"import {} from 'react-native'": { | |
"prefix": "irn", | |
"body": "import { $1 } from 'react-native'" | |
}, | |
"import {} from 'components'": { | |
"prefix": "icom", | |
"body": "import { $1 } from 'components'" | |
}, | |
"import { pug, styl, observer } from 'startupjs'": { | |
"prefix": "is", | |
"body": "import { pug, styl, observer$1 } from 'startupjs'" | |
}, | |
"import './index.styl'": { | |
"prefix": "ist", | |
"body": "import './index.styl'" | |
}, | |
"import {} from '@startupjs/ui'": { | |
"prefix": "iui", | |
"body": "import { $1 } from '@startupjs/ui'" | |
}, | |
"RFC with observer": { | |
"prefix": "rfc", | |
"body": [ | |
"import React from 'react'", | |
"import { pug, styl, observer } from 'startupjs'", | |
"", | |
"export default observer(function $1 () {$2", | |
" return pug``", | |
" /* eslint-disable-line */styl``", | |
"})", | |
"", | |
] | |
}, | |
"RFC with observer. Inline declaration with styles": { | |
"prefix": "rfci", | |
"body": [ | |
"const $1 = observer(() => {$2", | |
" return pug``", | |
" /* eslint-disable-line */styl``", | |
"})", | |
"" | |
] | |
}, | |
"RFC with observer for page": { | |
"prefix": "rfcp", | |
"body": [ | |
"import React from 'react'", | |
"import { pug, styl, observer } from 'startupjs'", | |
"import { Content } from '@startupjs/ui'", | |
"", | |
"export default observer(function $1 () {$2", | |
" const [fooBarId] = useLocal('$render.params.fooBarId')", | |
" return pug`", | |
" Content", | |
" `", | |
" /* eslint-disable-line */styl``", | |
"})", | |
"", | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment