JS
React.js
•
•
•
• LT3
• LT
•
•
React.js
wget
cd /var/www/ (DocumentRoot)
mkdir js
cd js
wget http://cdnjs.cloudflare.com/ajax/libs/react/
0.12.1/react-with-addons.js
wget http://fb.me/JSXTransformer-0.12.2.js
index.html
cd ../
vim index.html
<!DOCTYPE html>
<html>
<head lang="ja">
<meta charset="UTF-8">
<title>test</title>
</head>
<body>
<div id=“hello"></div>
<script type=“text/jsx">
var HelloWorld = React.createClass({
render: function() {
return (
<h1>Hello, world!</h1>
);
}
});
React.render(
<HelloWorld />,
document.getElementById('hello')
);
</script>
<script src="./js/react-with-addons.js"></script>
<script src="./js/JSXTransformer-0.12.2.js"></script>
</body>
</html>
• JavaScript HTML
• MVC V
•
•
React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈

React.js触ってみた 吉澤和香奈