What is error in this, i am simply following the new boston tutorial and while doing this i don't know why this error is coming
I edited the code now, it still not working
Code:
<!Doctype html>
<html>
<head>
<title>React Practice</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.2/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.2/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script>
</head>
<body>
<script type="text/jsx">
class Basics extends React.Component {
constructor () {
super();
this.state = {checked: true}
}
render(this.state.checked) {
var msg;
if () {
msg = 'checked';
} else {
msg = 'unchecked';
}
return (
<div>
<input type="checkbox" />
<h2>Checkbox is {msg}</h2>
</div>
)
}
}
ReactDOM.render(<Basics />, document.getElementById('example'));
</script>
<div id="example"></div>
</body>