React Base Fiddle (JSX)

Starting point for creating JSFiddles with React. This uses React with Addons.

by dingen2010

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.1/JSXTransformer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.1/react-with-addons.js"></script>
<script src="https://facebook.github.io/react/js/jsfiddle-integration.js"></script>

<div id="container">
    <!-- This element's contents will be replaced with your component. -->
</div>

JavaScript 1.7

var Test = React.createClass({
    render: function() {
        var stationComponents = this.props.stations.map(function(station) {
            return <div className="station">{station.call}</div>;
        });
        return <div>{stationComponents}</div>;
    }
});
 
 
 
var stations = [
  {call:'station one',frequency:'000'},
  {call:'station two',frequency:'001'}
] 
React.render(<Test stations={stations} />, document.getElementById('container'));