class TaskOutput extends Component {
render() {
for (var i = 0; i < localStorage.length; i++) {
const list = JSON.parse(localStorage.getItem('task'+i))
return (
<div className={'task'+i}>
<h1>{list['title']}</h1>
<p>{list['description']}</p>
</div>
)
}
}
}
class TaskOutput extends Component {
render() {
var list = [];
for (var i = 0; i < localStorage.length; i++) {
const list = JSON.parse(localStorage.getItem(localStorage.key(i)))
list .push(
<div className={'task'+i}>
<h1>{list['title']}</h1>
<p>{list['description']}</p>
</div>
)
}
return <div>list</div>;
}
}