Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLeo Penaloza
8,426 PointsReason for not rendering JSX?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<!-- React Core -->
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<!-- React DOM -->
<script type="text/babel" src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<!-- Babel core/ we can use JSX without a built step because it's a standalone -->
</head>
<body>
<div>
<script>
// React.createElement(
// function What () {
// alert("This is a react test");
// });
React.createElement(
function What() {
<h1>Header</h1>
}
)
ReactDOM.render(
<what/>,
document.getElementById("clock")
);
</script>
</div>
<h1 id="clock"></h1>
</body>
</html>
Edited for readability. - Dane E. Parchment Jr. (Moderator)
1 Answer
Matthew Griffith
21,003 PointsIt may be that in the ReactDOM.render the what tag needs to be capitalized. <What />