var React = require('react'); var ErrorMessages = React.createClass({ render: function() { if (!this.props.errors.length) { return
; } var errorNodes = this.props.errors.map(function(e, i) { return (
  • {e}
  • ); }); return (
      {errorNodes}
    ); } }); module.exports = ErrorMessages;