[Vue] Angular vs React vs Vue
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
< !DOCTYPE html > < html > < head > < meta charset = "utf-8" / > < title > Hello React! < / title > < script src = https://unpkg.com/react@16/umd/react.development.js" > < / script > < script src = https://unpkg.com/react-dom@16/umd/react-dom.development.js" > < / script > < script src = https://unpkg.com/babel-standalone@6.26.0/babel.js" > < / script > < / head > < body > < div id = "root" > < / div > < script type = "text/babel" > class Root extends React.Component { constructor() { super(); this.state = { message: 'hello react' } } render() { return < h1 > {this.state.message} < / h1 > h1h1 } } ReactDOM.render( < Root / > , document . getElementById ( 'root' )); Root)); < / script > < / body > < / html >
from http://sw-ko.tistory.com/55 by ccl(A)
댓글
댓글 쓰기