todo
21 строка · 666.0 Байт
1import React, { useState } from 'react';
2import ToDoList from '../../components/ToDoList';
3import ToDoForm from '../../components/ToDoForm';
4import ToDoFilter from '../../components/ToDoFilter';
5import './App.css';
6
7const App: React.FC = () => {
8const [tasks, setTasks] = useState<Array<Task>>([]);
9const [filter, setFilter] = useState<Filter>('All');
10
11return (
12<div className="todo-app">
13<h1>todos</h1>
14<ToDoForm setTasks={setTasks} />
15<ToDoList tasks={tasks} setTasks={setTasks} filter={filter} />
16<ToDoFilter filter={filter} setFilter={setFilter} />
17</div>
18);
19}
20
21export default App;
22