<div id="root">
 
</div>
class CarsList extends React.Component {
  constructor() {
    super();
    this.state = { cars: [] };
  }
  componentDidMount() {
    getCars(cars =>
      this.setState({ cars: cars }));
  }
  render() {
    return (
      <ul>
        {this.state.cars.map(e => (
          <li>{e.make}: {e.model}</li>
        ))}
      </ul>
    );
  }
}


const getCars = auto =>
  auto([
    { make: "Mercedes Benz", model: "GLE 43 AMG" },
    { make: "Audi", model: "A8" }
  ]);

ReactDOM.render(
  <CarsList />,
  document.getElementById("root")
);
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.min.js