Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.
We used to use Traceur for this. Turns out Babel can do everything Traceur can does and more, and seems to have more love and momentum. So instead of offering Babel in addition to Traceur, we just replaced it. If you had a Traceur Pen, it's using Babel now.
Bonus! React does JSX too
ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('example') );
The only way this worked before is if you included the JSX transpiler thingy and put the script on the page with a special
type. You could do it on CodePen, but it was pretty hacky.
Here's the basic example right from the React docs: