I'm getting this error back though this same format seems to work in examples.
    const response = await axios.get('http://localhost:5000/get-tasks')

    const dataObject = response.data
    

    const arrayOfKeys = Object.keys(dataObject)
    const arrayOfData = Object.keys(dataObject).map((key) => dataObject[key])

    console.log(arrayOfKeys)
    console.log(arrayOfData)
  }, [])```


I'm getting an error: Effect callbacks are synchronous to prevent race conditions. I'm having trouble formatting it in the way it wants
The useEffect function arg can't be asynchronous, but you can call an async function inside it.
useEffect(() => {
  async function getTasks() {
    const response = await axios.get('http://localhost:5000/get-tasks')

    const dataObject = response.data

    const arrayOfKeys = Object.keys(dataObject)
    const arrayOfData = Object.keys(dataObject).map((key) => dataObject[key])

    console.log(arrayOfKeys)
    console.log(arrayOfData)
  };

  getTasks();
}, []);

