React with ES6

getting start

http://jsbin.com/fuyedekaga/1/edit?html,js,console,output
Reactrepogtory
html

<!DOCTYPE html>
<html>
<head>
<script src="//fb.me/react-0.14.3.js"></script>
<script src="//fb.me/react-dom-0.14.3.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div id="fafa"></div>
</body>
</html>

javascript

class HelloMessage extends React.Component {
  constructor(props){
    super(props);
  }
  render(){
   return (<div>Hello {this.props.name}</div>
  );
 }
}
React.render(<HelloMessage name="kenji" />, document.getElementById("fafa"));

(Visited 1 times, 1 visits today)

コメントを残す

メールアドレスが公開されることはありません。