title: Adding a new task for todo with render function react
body: <p>So I am trying to use true and false boolean to render the edit button for my todo list in react.</p>
  
  <p>My thought is if edit button is clicked -> editing == true --> show renderEditing(). If editing is false show renderNormal(). </p>
  
  <p>Now when user clicks edit, it shows the renderEdit() page but however, all list is also showing the textform.. see image</p>
  
  <p><a href="https://i.stack.imgur.com/ivdpK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ivdpK.png" alt="enter image description here"></a></p>
  
  <p>Here is renderEditing() code which i think is the issue...</p>
  
  <pre><code>renderEditing() {
      return (
          &lt;div&gt;
            &lt;h1&gt;My awesome todo list&lt;/h1&gt;
            &lt;label htmlFor="newTodoDescription"&gt;Add Todo&lt;/label&gt;
            &lt;input
              type="text"
              value={this.state.newTodoDescription}
              name="newTodoDescription"
              id="newTodoDescription"
              onChange={this.handleOnChange}
            /&gt;
            &lt;button onClick={this.handleAddTodo}&gt;+&lt;/button&gt;
  
            &lt;ul&gt;
            {this.state.todos.map(todo =&gt; {
  
              return (
                &lt;li
                  onClick={() =&gt; this.handleTodoClick(todo)}
                  id= {todo.id}
                  &gt;
  
                  {todo.description}
  
        &lt;textarea ref ="editTodoDescription"
  defaultValue = {this.state.todo}
  name= "editTodoDescription"
  id ="editTodoDescription"
  &gt;&lt;/textarea&gt;
  
  
                  &lt;button onClick={() =&gt; this.handleSave(todo)} &gt; save 
  &lt;/button&gt;          
  &lt;/li&gt;
  
  
              );
            }
  
            )
            }
            &lt;/ul&gt;
  
  
          &lt;/div&gt;
        ); 
  }
  </code></pre>
  
  <p>updated textarea value to todo but when i click edit for one button, two are still showing up...</p>
  
  <p><a href="https://i.stack.imgur.com/S2crp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S2crp.png" alt="enter image description here"></a></p>