File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
ep14-add-id-to-todo/app/components
ep15-use-proptypes/app/components
ep16-new-css/app/components
ep17-edit-todo-part1/app/components
ep18-edit-todo-part2/app/components Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default class DisplayList extends React.Component {
7
7
return < ul >
8
8
{ this . props . todos . map ( ( todo , i ) => {
9
9
return < DisplayItem
10
- key = { todo . title }
10
+ key = { todo . id }
11
11
todo = { todo }
12
12
handleDone = { this . props . handleDone }
13
13
handleDelete = { this . props . handleDelete } /> ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default class DisplayList extends React.Component {
7
7
return < ul >
8
8
{ this . props . todos . map ( ( todo , i ) => {
9
9
return < DisplayItem
10
- key = { todo . title }
10
+ key = { todo . id }
11
11
todo = { todo }
12
12
handleDone = { this . props . handleDone }
13
13
handleDelete = { this . props . handleDelete } /> ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default class DisplayList extends React.Component {
6
6
render ( ) {
7
7
return < ul id = "todo-list" >
8
8
{ this . props . todos . map ( ( todo , i ) => {
9
- return < section id = "main" key = { todo . title } >
9
+ return < section id = "main" key = { todo . id } >
10
10
< DisplayItem
11
11
todo = { todo }
12
12
handleDone = { this . props . handleDone }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default class DisplayList extends React.Component {
6
6
render ( ) {
7
7
return < ul id = "todo-list" >
8
8
{ this . props . todos . map ( ( todo , i ) => {
9
- return < section id = "main" key = { todo . title } >
9
+ return < section id = "main" key = { todo . id } >
10
10
< DisplayItem
11
11
todo = { todo }
12
12
handleDone = { this . props . handleDone }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default class DisplayList extends React.Component {
6
6
render ( ) {
7
7
return < ul id = "todo-list" >
8
8
{ this . props . todos . map ( ( todo , i ) => {
9
- return < section id = "main" key = { todo . title } >
9
+ return < section id = "main" key = { todo . id } >
10
10
< DisplayItem
11
11
todo = { todo }
12
12
handleDone = { this . props . handleDone }
You can’t perform that action at this time.
0 commit comments