import React from 'react'
import Answer from './Answer'

class Question extends React.Component {
  constructor () {
    super()
    this.state = {
      selectedAnswer: null
    }
  }

  render () {
    const { instruction, text, correct, answers } = this.props
    return (
      <div>
        <p>{instruction}</p>
        <p>{text}</p>
        <ul>
          {answers.map((a, i) => (
            <Answer key={i}
                    active={i === this.state.selectedAnswer}
                    onClick={() => this.setState({ selectedAnswer: i })}>{a}</Answer>
          ))}
        </ul>
    </div>
    )
  }
}

export default Question

@@ -97,46 +97,8 @@
 %7B%0A  
-constructor () %7B%0A    super()%0A    this.
 stat
@@ -103,18 +103,16 @@
 ate = %7B%0A
-  
     sele
@@ -132,14 +132,8 @@
 ull%0A
-    %7D%0A
   %7D%0A

Use ES7 class properties