content: import React, { Component } from 'react';
  import 'whatwg-fetch';
  
  import styles from './App.css';
  
  export default class App extends Component {
    constructor(...args) {
      super(...args);
  
      this.state = {};
    }
  
    componentDidMount() {
      fetch('https://www.reddit.com/r/reactjs.json')
        .then(response => response.json())
        .then(json => json.data.children.map(child => child.data))
        .then(posts => this.setState({ posts }));
    }
  
    render() {
      if (!this.state.posts) {
        return (<div>No Posts</div>);
      }
  
      return (<ul style={styles['.App']}>{this.state.posts.map(post => <li key={post.id}>{post.title}</li>)}</ul>);
    }
  }
  