title: Why am I getting a 'no-unused-var' error when using in an inline function
body: <p>Here's a snippent of my code:</p>
  
  <pre><code>const prevState = this.state;
  this.setState(prevState =&gt; ({
    companies_checked: {
      ...prevState.companies_checked,
      [target.value]: target.checked
    }
  }));
  </code></pre>
  
  <p>It is generating the following error:</p>
  
  <pre><code>Line 52:  'prevState' is assigned a value but 
  never used  no-unused-vars
  </code></pre>
  
  <p>I'm using the variable in the inline/arrow function. What's the best way to make the error go away?</p>