코드 잡동사니

React Component 본문

아무거나

React Component

세객 2018. 9. 15. 21:19
class Test extends React.Component {
Hello() {
return 20
}
render() {
const a = function () {alert(cc)}
const b = () => {alert(this.Hello())}
try {
a()
} catch (error) {
alert("A에서 오류 발생")
alert(error)
}
try {
b()
} catch (error) {
alert("B에서 오류 발생")
alert(error)
}
// alert(this.a)
// alert(this.Hello())
// this.props.color
// this.props.children
return <h1 style={{color: this.props.color}}>{this.props.children}</h1>
}
}

'아무거나' 카테고리의 다른 글

정규표현식 기호  (0) 2019.09.13
정규표현식 테스트 사이트  (0) 2019.09.13
MySQL, MariaDB 한글 적용 database 명령어  (0) 2019.06.20
키보드 출력 문자 발음 표시?  (0) 2017.12.05
Comments