Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Minimal Api Todos React App

Lester 60

@lesterdlb

Desktop design screenshot for the Todo app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

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

Nathan Zed 120

@TKSHII

Posted

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 GitHub
Discord logo

Join 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