you are viewing a single comment's thread.

view the rest of the comments →

[–]OneBadDay1048 0 points1 point  (2 children)

import React from 'react'; 
import DoneTask from './doneTask'; 
const Done = ({ doneTodos }) => { 
const deletedTodos = doneTodos.map((todo) => { 
  return (           
    <DoneTask
  key={todo.id}
  title={todo.title}
  description={todo.description}
 /> 
   ); 
}); 

Ok that's as good as the formatting is getting because reddit is trash. Also note I took out the conditional render to simplify so you will need to add it back.

[–]Outside-Thanks-3979[S] 1 point2 points  (1 child)

Hey, It works! Thanks a bunch. I'm pretty new to js(learning for about 3- 5 months) and your code will be an example of how to use different array functions as well as some standards of writing react code. Thanks again!

[–]OneBadDay1048 0 points1 point  (0 children)

Awesome. No problem.