Skip to content

Tag: reactjs

Delete an element from the array and update order

I have an array of objects in the state. The object has the order property. I need order prop for drag and drop. The list is sorted by order. Also, there is a function to remove an item from the list. How to correctly remove an element from an array with updating the order property? I wrote this solution base…