Edit in JSFiddle

class Repositories extends React.Component {
  componentWillMount () {
    fetch(`https://api.github.com/users/${this.props.user}/repos`)
    .then(x => x.json())
    .then(x => this.setState({repos: x}))
  }  
  render() {
    
    if(this.state===null){
      return null
    }
    
    return (
    	<div>
      	<h3>{this.props.user}</h3>
      	<ul>
        	{this.state.repos.map(x => <li>{x.name}</li>)}
      	</ul>
      </div>
    );
  }
}




React.render(
  <Repositories user="sindresorhus"/>,
  document.getElementById('container')
);
<script src="https://facebook.github.io/react/js/jsfiddle-integration-babel.js"></script>

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