With this code I get this error. I’ve looked and looked but can’t seem to find the problem. Any suggestions?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>More Components</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/[email protected]/babel.min.js"></script>
<style>
#container {
padding: 50px;
background-color: #FFF;
}
</style>
</head>
<body>
<div id="container"></div>
<script type="text/babel">
class Card extends React.Component {
render() {
var cardStyle = {
height: 200,
width: 150,
padding: 0,
backgroundColor: "#FFF",
boxShadow: "0px 0px 5px #666"
};
return (
<div style={cardStyle}>
</div>
);
}
}
class Square extends React.Component {
render() {
var squareStyle = {
height: 150,
width: 150,
backgroundColor: "#FF6663"
};
return(
<div style={squareStyle}>
</div>
);
}
}
class Label extends React.Component {
render() {
var labelStyle = {
fontFamily: "sans-serif",
fontWeight: "bold",
padding: 13,
margin: 0
};
return (
<p style={labelStyle}>#FF6663</p>
);
}
}
ReactDOM.render(
<div style={cardStyle}>
<Square/>
<Label/>
</div>,
document.querySelector("#container")
);
</script>
</body>
</html>