Design comparison
Solution retrospective
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.
Community feedback
- @TKSHIIPosted about 2 years ago
For the drag and drop i recommend you to check react-dnd or framer-motion :)
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord