title: Move object in array by index value in React native
body: <p>So I have a <code>item</code> that is an object in my array state <code>items</code>.
  I'm also getting the item-content (with its ID) and index of the current item into the function <code>indexMove</code>.</p>
  <p>So <code>indexMove</code> is a function that is fired when I'm pressing a specific <code>item</code> from <code>items</code>.</p>
  <p>My goal is that when <code>indexMove</code> is pressed the index number of the item decreases by 1 so it moves UP in the list. However the item at index 0 should just stop and not be able to move further up.</p>
  <p>I really hope I'm being clear because it's a bit hard to explain, but how would I write this to change the items by index? Thank you</p>
  <pre><code>const [items, setItems] = useState([])
  
  const indexMove = (item, index) =&gt;{
     console.log(item)
     console.log(index)
  }
  </code></pre>