-
-
Save velopert/8f22cf0830e65f6de8ae99808c5b92f5 to your computer and use it in GitHub Desktop.
React Component Snippet - rc
This file contains 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
# 이 부분을 File - Snippet 에 들어가서 복사 & 붙여넣기 하세요. | |
'.source.js': | |
'React Component': | |
'prefix': 'rc' | |
'body': ''' | |
import React, { Component, PropTypes } from 'react'; | |
const propTypes = { | |
}; | |
const defaultProps = { | |
}; | |
class ${1:MyComponent} extends Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return( | |
<div>${1:MyComponent}</div> | |
); | |
} | |
} | |
${1:MyComponent}.propTypes = propTypes; | |
${1:MyComponent}.defaultProps = defaultProps; | |
export default ${1:MyComponent}; | |
''' |
감사합니다!
감사합니다! React 시작한지 얼마 안되었는데 많은 도움이 되고 있습니다.
Vs code 버전
"react first set":{
"prefix": "rc",
"body": [
"import React, { Component, PropTypes } from 'react'; ",
"const propTypes = { };",
"const defaultProps = { };",
"class $1 extends Component { ",
"\tconstructor(props) { ",
"\t\tsuper(props)",
"\t}",
"\trender() {",
"\t\treturn(",
"\t\t\t<div>$1</div>",
"\t\t);",
"\t}",
"}",
"$1.propTypes = propTypes;",
"$1.defaultProps = defaultProps",
"export default $1;"
]
}
감사합니다.
감사합니다 :D
감사합니다
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
감사합니다.