Submitted
Minimal Api Todos React App
- HTML
- CSS
- JS
I'm not really satisfied with how I handle the update of the Todos after every drag and drop. Basically, every item has an index property, and depending on where the user drops it, I proceed to update every index, by either adding 1 (User moved the item up) or subtracting 1 (User moved the item down), between the original position and the new one. Perhaps a data structure like a linked list could be a better solution?
I'm more of a backend developer, so any feedback regarding how I structured the React application would be appreciated.