how to change the index position of an item in a state array and the do setState in react native code example
Example: update object in array state by index
this.setState(({items}) => ({
items: [
...items.slice(0,1),
{
...items[1],
name: 'newName',
},
...items.slice(2)
]
}));