title: React - change button color after clicking
body: <p>I have the following button:</p>
  
  <pre><code>{this.steps.map((step, index) =&gt; (
      &lt;Button variant="raised" color={(step.answer === 'done' ? 'primary' : 'default')}
                              onClick={this.markAs('done', step)}&gt;
                                  Done
                              &lt;/Button&gt;
  )}
  </code></pre>
  
  <p>my <code>markAs()</code> function looks like this:</p>
  
  <pre><code>markAs(value, step) {
          step.answer = value;
      }
  </code></pre>
  
  <p>Although <code>step.answer</code> changes to <code>done</code>, the color of the button stays the same.</p>
  
  <pre><code>class App extends Component {
     steps = [...some steps];
  }
  </code></pre>
  
  <p>What's wrong?</p>