React Base Fiddle (JSX)

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

by Shah Danial

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js"></script>
<script src="https://npmcdn.com/react@latest/dist/react-with-addons.js"></script>
<script src="https://npmcdn.com/react-dom@latest/dist/react-dom.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://facebook.github.io/react/js/jsfiddle-integration-babel.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

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

JavaScript 1.7

class App extends React.Component {
  constructor() {
    super();
    this.state = {
    };
  }
  
  _createList(){
      let a = [];
      [1,2,3,4,5,6,7,8].map((el)=>{
   if(el % 5 == 0)
  a.push(<br key={el+100}/>);
  a.push(<span key={el} className="col-md-3">{el}</span>);
      })
      return a;
}
  
  render() {
    return (
      <div>
        {this._createList()}
      </div>
    )
  }
}

ReactDOM.render(<App />, document.getElementById('container'));