Components Extracted

This commit is contained in:
Leoh 2021-10-15 17:33:32 +05:30
parent 98a15c0c9e
commit d4c2d25586
5 changed files with 35 additions and 20 deletions

View file

@ -0,0 +1,9 @@
import * as React from "react";
import TodoItem from "./TodoItem"
export default function Index(props: any){
const listItems = props.todos.map((todo: any) => {
return <TodoItem key={todo.id} id={todo.id} todo_text={todo.text} onChange={props.onChange} completed={todo.completed}/>
})
return(<ul>{listItems}</ul>);
}