React Hook useEffect has missing dependencies: 'dataD' and 'dataDrink'. Either include them or remove the dependency array. If 'dataD' changes too often, find the parent component that defines it and wrap that definition in useCallback code example

Example: React Hook useEffect has a missing dependency:'. Either include it or remove the dependency array.

import React, { useEffect, useState } from 'react';
import Todo from './Todo';
 
const TodoList = () => {
  const [todos, setTodos] = useState([]);
  useEffect(() => {
    fetch('https://jsonplaceholder.typicode.com/todos')
      .then(response => response.json())
      .then(data => {
        setTodos(data);
      })
  });
  return (
    <div>
      {
        todos.map(todo => (
          <Todo
            key={todo.id}
            title={todo.title}
            completed={todo.completed}
          />
        ))
      }
    </div>
  )
}
 
export default TodoList;