/
/
TodoList — renders the array of todos sorted by creation date (newest first). Maps each todo to a TodoItem component.
14 export function TodoList({ todos, onToggle, onDelete }: TodoListProps) {
Sort by newest first, then map to individual TodoItem components
16 const sorted = [...todos].sort((a, b) => b.createdAt - a.createdAt);