React Base Fiddle (JSX)

Starting point for creating JSFiddles with React.

by Rishabh Sharma

HTML

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

Babel + JSX

class Hello extends React.Component {
	constructor(props) {
  	super(props);
    this.state = {jobs: [{
	id: 1,
  emails: [{
  	id: 1,
    emailId: '[email protected]',
    emailType: 'to'
  }, {
  	id: 2,
    emailId: '[email protected]',
    emailType: 'to'
  }]
}]};
  }
  render() {
    return (<div>
    {this.state.jobs[0].emails.map(email => { 
    	return <input type="email" />
    })}
    </div>);
  }
}

ReactDOM.render(
  <Hello name="World" />,
  document.getElementById('container')
);