How do I get my getData() function to actually return the data. At the moment I get a console log of a promise object
function getData() {
fetch('//some api url')
.then(response => response.json())
.then(data => { return data })
};
export const data = getData();
console.log(data); // returns promise, not actual object