Atoms > make todo list in an array of objects
each object represents one todo list
example 1)
const todoListState = atom({
key: 'TodoList',
default: [],
});
========
function TodoList() {
const todoList = useRecoilValue(todoListState);
return (
<>
{/* <TodoListStats /> */}
{/* <TodoListFilters /> */}
<TodoItemCreator />
{todoList.map((todoItem) => (
<TodoItem key={todoItem.id} item={todoItem} />
))}
</>
);
}