import React from 'react';
import Message from './Message';

export default function(props) {
  return <div>{props.messages.map(createMessage)}</div>;
  function createMessage(message) {
    return (
      <Message
        key={message.uuid}
        message={message}
        onDelete={props.onDelete}
      />
    );
  }
};

import React from 'react';
import Message from './Message';

export default React.createClass({
  render: function() {
    return <div>{this.props.messages.map(createMessage, this)}</div>;
    function createMessage(message) {
      return (
        <Message
          key={message.uuid}
          message={message}
          onDelete={this.props.onDelete}
        />
      );
    }
  }
});

Revert to React.createClass style for testing purposes
Revert to React.createClass style for testing purposes
