scrimba
7 - Todo List
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

7 - Todo List
AboutCommentsNotes
7 - Todo List
Expand for more info
App.js
run
preview
console
import React from "react";
import TodoItem from "./TodoItem";
import todosData from "./todosData";

function App () {
// const todoItems = todosData.map(function (item) {
// <TodoItem item={item}/>
// });

const todoItems = todosData.map(item => <TodoItem item={item}/>)
return(
<div className="todo-list">
{todoItems}
</div>
)
}

export default App;
Console
!
"Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `App`. See https://fb.me/react-warning-keys for more information. in TodoItem (created by App) in App"
,
{item:
{id:
1
, text:
"kain"
, completed:
true
}
}
,
{item:
{id:
2
, text:
"tulog"
, completed:
false
}
}
,
{item:
{id:
3
, text:
"Code"
, completed:
false
}
}
,
index.html
LIVE