n</span>

  <span class="cm">/* Function that is passed to useEffect. */</span>
  <span class="kd">function</span> <span class="nf">effectFn</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">if </span><span class="p">(</span><span class="o">!</span><span class="nx">timer</span><span class="p">.</span><span class="nx">isRunning</span><span class="p">)</span> <span class="p">{</span>
      <span class="nx">timer</span><span class="p">.</span><span class="nf">startTicking</span><span