title: How to reduce cognitive complex in javascript event handler?
body: <p>I have some element event handler uses if statement inside, why sonar complains this if statement causes cognitive complexity? Is there a way I can avoid this or improve this?</p>
  <pre><code>const handleOnBlur = () =&gt; {
      if (isEditMode) {
          setMyStuff(false);
      }
  };
  </code></pre>
  <p>This is counted as code smell +2, including 1 for nesting. Why if statement causes code smell especially I don't have very complex if, else or nested if statements.</p>
  <p>Thank you!</p>