making build much much faster

This commit is contained in:
Ken
2019-02-15 15:01:17 -08:00
parent d43986bfe7
commit 15ba6828f6
2 changed files with 15 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ interface TodoListProps {
}
export const TodoList = (props: TodoListProps) => {
const { filter, todos, complete, remove, edit } = this.props;
const { filter, todos, complete, remove, edit } = props;
const filteredTodos = Object.keys(todos).filter(id => {
return filter === 'all' || (filter === 'completed' && todos[id].completed) || (filter === 'active' && !todos[id].completed);
});