Skip to content
Permalink
Browse files

Show items total.

  • Loading branch information...
alexventuraio committed Apr 15, 2019
1 parent 3fb6098 commit 746c3c98d09e00222c1212b62a8dec9e7e9437d0
Showing with 15 additions and 12 deletions.
  1. +15 −12 todolist-react/src/components/ItemsList.js
@@ -18,18 +18,21 @@ class ItemsList extends Component {

render() {
return (
<ul>
{this.props.items.map((item, index) => {
return (
<li
onClick={this.onCompleteHandler(item.id)}
key={index}
>
{item.description}
</li>
);
})}
</ul>
<div>
<ul>
{this.props.items.map((item, index) => {
return (
<li
onClick={this.onCompleteHandler(item.id)}
key={index}
>
{item.description}
</li>
);
})}
</ul>
Total Items: {this.props.items.length}
</div>
);
};
};

0 comments on commit 746c3c9

Please sign in to comment.
You can’t perform that action at this time.