title: Conditional Buttons True and False React
body: <p><a href="https://i.stack.imgur.com/VFGy0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VFGy0.png" alt="enter image description here" /></a></p>
  <p>I believe that the error may be here ...</p>
  <pre><code>{options.map((option) =&gt; (
            &lt;button
              key={option}
              className={`${myAnswer === option
                  ? &quot;true&quot;
                  : myAnswer !== option
                  ? &quot;button&quot;
                  : &quot;false&quot;
              }`}
              onClick={() =&gt; this.checkAnswer(option)}
            &gt;
              {option}
            &lt;/button&gt;
          ))}
  </code></pre>
  <p>How do I make sure that when the user clicks the correct answer the True class (appears) and when he clicks the wrong answer the False class appears on other buttons. Would it be possible after clicking the first time to leave the buttons disabled, so that it is impossible to change the answer?</p>
  <ul>
  <li>
  <ul>
  <li>
  <ul>
  <li>
  <blockquote>
  <p><a href="https://codesandbox.io/s/react-quiz-app-8b48o" rel="nofollow noreferrer">DemoCode</a> &lt; - - -</p>
  </blockquote>
  </li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  <p><a href="https://i.stack.imgur.com/VW8O3.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VW8O3.gif" alt="enter image description here" /></a></p>