diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index cec502d..c0fcd10 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -45,8 +45,33 @@ snippet jsx "import React ..." import React from "react" export default () => ( - <${1:div}> - $0 - + <${1:div}>$0 ) endsnippet + +snippet jsxs "import React ... (styled)" +import React from "react" +import styled from "styled-components" + +const $1 = styled.${2:div}\` + $3 +\` + +export default () => ( + <$1>$0 +) +endsnippet + +snippet xc "class ..." +class $1 extends React.component { + constructor(props) { + super(props) + this.setState({$0}) + } + + render() { + return ( + ) + } +} +endsnippet