title: Change button caption by condition React jsx
body: <p>There is a button on the notes page with a deactivation function,
  there is a note object (todo) it has an is_active property with a value of False or True , this property changes when clicked
  please tell me how to make it so that when the button is pressed, the inscription changes along with the value: &quot;Open&quot; : &quot;Closed&quot;, how and where to write the condition correctly. I found an option, but for some reason it does not work. Here is my note code:</p>
  <pre><code>const TodoItem = ({todo, deleteTODO}) =&gt; {
      // &lt;div&gt;if todo.is_active === 'True' ? button:'Open' : button:'Closed'&lt;/div&gt;
      return (
          &lt;tr&gt;
              &lt;td&gt;{todo.id}&lt;/td&gt;
              &lt;td&gt;{todo.name_project}&lt;/td&gt;
              &lt;td&gt;{todo.text}&lt;/td&gt;
              &lt;td&gt;{todo.date_create}&lt;/td&gt;
              &lt;td&gt;{todo.date_update}&lt;/td&gt;
              &lt;td&gt;{todo.creator}&lt;/td&gt;
              {/*&lt;td&gt;{todo.is_active}&lt;/td&gt;*/}
              &lt;td&gt;
                  {todo.is_active === 'True' ?
                  &lt;button onClick={() =&gt; deleteTODO(todo.id)}  type='button'&gt;Open &lt;/button&gt;:
                  &lt;button onClick={() =&gt; deleteTODO(todo.id)}  type='button'&gt;Closed &lt;/button&gt;}
              &lt;/td&gt;
          &lt;/tr&gt;
      )
  }
  </code></pre>