Last active
April 18, 2018 03:10
-
-
Save lucianomlima/ad1d16a92841a60c0a257047cd1b55e2 to your computer and use it in GitHub Desktop.
Revisions
-
lucianomlima revised this gist
Apr 18, 2018 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -54,18 +54,18 @@ "React: stateless component": prefix: "rcs" body: "import React from \'react\';\n\nconst $1 = ${2:props} => (\n\t$3\n);\n\nexport default ${1};\n" "React: local stateless component": prefix: "rcsl" body: "const $1 = ${2:props} => (\n\t$3\n);\n" "React: component method": prefix: "rcm" body: "${1:_methodName} ($2) {\n\t$3\n}" "React: component binded method": prefix: "rcbm" body: "${1:_methodName} = ($2) => {\n\t$3\n}" "React: this.props.": -
lucianomlima revised this gist
Apr 18, 2018 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ body: "import ${1} from './${1}';" "React: constructor": prefix: "construct" body: "constructor(props) {\n\tsuper(props);\n\t${1}\n}" "React: componentDidMount() { ... }": @@ -36,6 +36,18 @@ prefix: "scup" body: "shouldComponentUpdate(nextProps, nextState) {\n\t${1}\n}" "React: componentDidCatch(e, i) { ... }": prefix: "cdc" body: "componentDidCatch(error, info) {\n\t${1}\n}" "React: getDerivedStateFromProps(np, ps) { ... }": prefix: "gdsfp" body: "getDerivedStateFromProps(nextProps, prevState) {\n\t${1}\n}" "React: getSnapshotBeforeUpdate(pp, ps) { ... }": prefix: "gsbu" body: "getSnapshotBeforeUpdate(prevProps, prevState) {\n\t${1}\n}" "React: class skeleton": prefix: "rcc" body: "import React from \'react\';\n\nclass $1 extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t$2\n\t\t);\n\t}\n}\n\nexport default ${1};" -
lucianomlima revised this gist
Apr 7, 2018 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,13 @@ { ".source.js": "React: import component": prefix: "li" body: "import ${1} from './${1}';" "React: constructor": prefix: "constructor" body: "constructor(props) {\n\tsuper(props);\n\t${1}\n}" "React: componentDidMount() { ... }": prefix: "cdm" body: "componentDidMount() {\n\t${1}\n}" -
lucianomlima revised this gist
Apr 7, 2018 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -52,15 +52,23 @@ prefix: "props" body: "this.props.${1}" "React: const { p } this.props": prefix: "cprops" body: "const { $1 } = this.props;" "React: this.state.": prefix: "state" body: "this.state.${1}" "React: const { s } this.state": prefix: "cstate" body: "const { $1 } = this.state;" "React: this.state = { ... }": prefix: "is" body: "this.state = {\n\t${1}: ${2}\n}" "React: setState({ ... })": prefix: "sst" body: "this.setState({ ${1}: ${2} });" } -
lucianomlima created this gist
Jul 4, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,66 @@ { ".source.js": "React: componentDidMount() { ... }": prefix: "cdm" body: "componentDidMount() {\n\t${1}\n}" "React: componentDidUpdate(pp, ps) { ... }": prefix: "cdup" body: "componentDidUpdate(prevProps, prevState) {\n\t${1}\n}" "React: componentWillMount() { ... }": prefix: "cwm" body: "componentWillMount() {\n\t${1}\n}" "React: componentWillReceiveProps(np) { ... }": prefix: "cwrp" body: "componentWillReceiveProps(nextProps) {\n\t${1}\n}" "React: componentWillUnmount() { ... }": prefix: "cwun" body: "componentWillUnmount() {\n\t${1}\n}" "React: componentWillUpdate(np, ns) { ... }": prefix: "cwup" body: "componentWillUpdate(nextProps, nextState) {\n\t${1}\n}" "React: shouldComponentUpdate(np, ns) { ... }": prefix: "scup" body: "shouldComponentUpdate(nextProps, nextState) {\n\t${1}\n}" "React: class skeleton": prefix: "rcc" body: "import React from \'react\';\n\nclass $1 extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t$2\n\t\t);\n\t}\n}\n\nexport default ${1};" "React: stateless component": prefix: "rcs" body: "import React from \'react\';\n\nconst $1 = (${2:props}) => {\n\treturn (\n\t\t$3\n\t);\n}\n\nexport default ${1};\n" "React: local stateless component": prefix: "rcsl" body: "const $1 = (${2:props}) => {\n\treturn (\n\t\t$3\n\t);\n}\n" "React: local component function": prefix: "rcf" body: "${1:_methodName} ($2) {\n\t$3\n}" "React: local component binded function": prefix: "rcbf" body: "${1:_methodName} = ($2) => {\n\t$3\n}" "React: this.props.": prefix: "props" body: "this.props.${1}" "React: this.state.": prefix: "state" body: "this.state.${1}" "React: this.state = { ... }": prefix: "is" body: "this.state = {\n\t${1}: ${2}\n}" "React: setState({ ... })": prefix: "sst" body: "this.setState({\n\t${1}: ${2}\n});" }