为啥我上来就报React.createClass is not a function啊
Uncaught TypeError: React.creatClass is not a function
源码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script>
<title>Document</title>
</head>
<body>
<div id="container"></div>
<script type="text/jsx">
console.log(React)
var TestClickComponent = React.creatClass({
render:function(){
return (
<div>
<button>显示|隐藏</button><span>点击测试</span>
</div>
);
}
});
var TestInputComponent = React.creatClass({
getInitialState:function(){
return{
inputContent:""
}
},
render:function(){
return (
<div>
<input type="text"/><span>{this.state.inputContent}</span>
</div>
);
}
});
React.render(
<div>
<TestClickComponent/>
<TestInputComponent/>
</div>,
document.getElementById('container'));
</script>
</body>
</html>