48
loading...
This website collects cookies to deliver better user experience
typeof
operator since it's not needed in the majority of cases -- this also lets you log multiple arguments.
"Labeled log to console": {
"prefix": "llog",
"body": [
"console.log(`❗ $TM_FILENAME:$TM_LINE_NUMBER '${2:expression}' <\\${typeof ${2:expression}\\}>`,${2:expression});"
],
"description": "Logs filename, rough line called, name, type, and value of expression "
},
typeof
- use with slog
then tab:"Short log to console": {
"prefix": "slog",
"body": [
"console.log(`❗ $TM_FILENAME:$TM_LINE_NUMBER '${2:expression}'`,${2:expression});"
],
"description": "Logs filename, rough line called, name, and value of expression "
},
<Wrapper>
element inside the component -- I needed that, you might not."React component": {
"prefix": "rreact",
"body": [
"import React from 'react';",
"import styled from 'styled-components';",
"const ${1:ComponentName} = ({${2:myProps}\\}) => {return (",
"\t<Wrapper>",
"\t\t'I'm a placeholder'",
"\t</Wrapper>",
")};",
"const Wrapper = styled.div``",
"export default ${1:ComponentName};"
]
},
flex-direction:column
may not be what you need, but since row
is the default it's easier to delete that line when you don't need it than to add it when you do. Depending on what you're doing, this might go in your JS or CSS snippets."Flexbox boilerplate": {
"prefix": "fflex",
"body": [
"display:flex;",
"flex-direction:column;",
"justify-content:center;",
"align-items:center;"
],
"description": "flexbox to center content"
},