title: Hide Element If It the Last Item in React
body: <p>I need to hide <code>TimelineConnector</code> if it is on the last item. How will i be able to hide it?
  Pls check my codesandbox</p>
  <p><a href="https://codesandbox.io/s/cranky-fermi-pjhsk?file=/demo.js" rel="nofollow noreferrer">CLICK HERE</a></p>
  <pre><code> {timelines.lastIndexOf(index) !== 1 ? &lt;TimelineConnector /&gt; : &quot;&quot;}
  </code></pre>