Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 4 months ago

Todo App with Fetch Requests to Backend

express, react
Nico Velasco•410
@Darionvr
A solution to the Todo app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Being able to use dnd-kit for the first time and make it work in this code was a big challenge. I'm happy with how, despite the difficulty, the code turned out quite clean and well-organized.

What challenges did you encounter, and how did you overcome them?

The most difficult part was adding the drag-and-drop functionality to reorder items. I used dnd-kit for the first time, and then the error appeared: {...listener} and {...attributes} from dnd-kit interfered with events like onChange. The solution was to remove {...listener} from the parent tag <li> to clear the event.

<li {...attributes}> 
<input onChange={()} />
<label> 
<p {...listener}> 
</label> 
</li> > 

Reaching this solution took me a long time—reading the documentation, and even using AI to understand what was happening.

What specific areas of your project would you like help with?

I would have liked the backend .json file to be stored in local memory so that I wouldn't have to modify the original backend. However, I ultimately decided that the logic should rely on different states and that the backend fetch should only be used the first time the page is rendered.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Nico Velasco's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License