const keys = LocalStKeys();
let tasks = [];
for (let taskText of keys) {
let ob = {text: taskText, key: Date.now()};
tasks.push(ob);
}
const [list, setItem] = useState(tasks);
console.log(list)
const [list, setItem] = useState([]);
const keys = LocalStKeys();
let tasks = [];
for (let taskText of keys) {
let ob = {text: taskText, key: Date.now()};
tasks.push(ob);
}
setItem(tasks)
console.log(list)