import { useMemo, useState } from "react" import { TaskItem } from "./components/TaskItem"; import { useTasks } from "./hooks/useTasks"; function App() { const [inputValue, setInputValue] = useState(''); const { tasks, addTask, deleteTask, toggleTask } = useTasks(); const completedCount = useMemo(() => { console.log("Counting tasks..."); return tasks.filter(t => t.completed).length; }, [tasks]); return (

SmartX Task Manager {completedCount}

setInputValue(e.target.value)} />
{tasks.length === 0 ? (

No task found. Lets add!

) : (
    {tasks.map(task => ( ))}
)}
) } export default App