import React, { Component } from 'react'

import ResponseFields from './ResponseFields.js'

export default class ResponseList extends Component {
  render () {
    return (
      <div className="response-list">
        { this.props.responses.map(response => {
            return (<ResponseFields
              response={response}
              key={this.props.responses.indexOf(response)}
              responseIndex={this.props.responses.indexOf(response)}
              onChangeResponse={this.props.onChangeResponse}
              onChangeQuestion={this.props.onChangeQuestion}
              onRemoveOption={this.props.onRemoveOption}
              onAddOption={this.props.onAddOption} />)
        })}
      </div>
    )
  }
}

import React, { Component } from 'react'

import ResponseFields from './ResponseFields.js'

export default class ResponseList extends Component {
  render () {
    return (
      <div className="response-list">
        { this.props.responses.map(response => (<ResponseFields
              response={response}
              key={this.props.responses.indexOf(response)}
              responseIndex={this.props.responses.indexOf(response)}
              onChangeResponse={this.props.onChangeResponse}
              onChangeQuestion={this.props.onChangeQuestion}
              onRemoveOption={this.props.onRemoveOption}
              onAddOption={this.props.onAddOption} />
        ))}
      </div>
    )
  }
}

Refactor code based on PR comments.
Refactor code based on PR comments.
