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

Todo App responsive with drag and drop using React.js

@JoaquinWald

Desktop design screenshot for the Todo app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Community feedback

@abrahamemamani

Posted

Estas usando un mismo state para todo, y cuando filtras se pierden el resto de valores. Podrías tener un objeto como state, con tres propiedades, y que el valor de cada una sea un array: all, completed, active, e ir actualizando la data que corresponda según la acción del usuario. Y vas a necesitar otro state que se actualice cuando se presione en alguno de los filtros. Para renderear por ejemplo: data[currentProp], donde currentProp va a ser el nombre de alguna de las propiedades del objeto. Y un consejo, mantené el mismo idioma en el código, lo ideal sería hacerlo todo en inglés. Espero haberte ayudado!

Marked as helpful

1

@JoaquinWald

Posted

@abrahamemamani Muchas gracias por tu respuesta Abraham! Voy a ponerme manos a la obra y modificar las cosas como indicas. Un abrazo.

0
Nelson 2,390

@nelsonleone

Posted

HELLO, congrats on completing this challenge 🎉 🎉 Your design is nice .

You used react so it would be easier with it , You can set a state of your active TODO, and your completed ones, When the user inputs, take those value and put them in the active state, when the cancel them, you set them to the completed state

You can use an array , to loop and render those value when the buttons are clicked

And do a conditional rendering is there is any TODO in the active / completed state, then display them.

Hope this made meaning you.

Marked as helpful

1

@JoaquinWald

Posted

@nelsonleone Thank you Nelson for your answer! I'll get hands to work for resolve this like you. A hug!

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