title: Trying to make a list item strikethrough onClick, but instead it's breaking my submit button
body: <p>I'm making a tasklist program using react and redux and I wrote a function to remove items from the list when you click on them and add them to a second list, but struck through. I'm trying to make the function trigger onClick on each list item, but for some reason when I add the event to it, when I click on the submit button to add a new task everything on the page disappears.  </p>
  
  <p>I've already tried other events like onMouseDown, and they all caused the same thing. I tried changing various parts of the code but the only thing that seems to break it is adding the onClick event. </p>
  
  <p>The function for handling the list removal is here</p>
  
  <pre><code>const taskReducer = (state = [[],[]], action) =&gt; {
      switch(action.type) {
          case ADD: 
              return [state[0].concat(action.task), [...state[1]]];
          case COMP:
              let idx = indexOf(state[0].filter(action.task));
              let beg = state.slice(0, idx);
              let end = state.slice(idx + 1);
              let newState = [[...beg, ...end], [...state[1], action.task]];
              return newState;
          default: 
              return state;
      }
  }
  </code></pre>
  
  <p>and the part that generates the button and two lists is here</p>
  
  <pre><code>&lt;button 
     id = 'submitGoal'
     onClick = {this.submitHandler} &gt;Submit&lt;/button&gt;
  &lt;ul id = 'currentTasks'&gt;
     {this.props.tasks.map( (task, idx) =&gt; {
          return (
               &lt;li onClick = {this.completeHandler(event.target)} key={idx}&gt;{task}&lt;/li&gt;
               )
          })
     }
  &lt;/ul&gt;
  &lt;ul id = 'completedTasks'&gt;
       {this.props.compTasks.map( (task, idx) =&gt; {
            return (
                 &lt;li key={idx}&gt;{task}&lt;/li&gt;
                 )
            })
       }
  &lt;/ul&gt;
  </code></pre>
  
  <p>The whole program is also live right now at <a href="https://jeengland.github.io/molehills/" rel="nofollow noreferrer">https://jeengland.github.io/molehills/</a></p>
  
  <p>Thanks in advance for any help!</p>