Get Data From An API With windowfetch

This is how I'm pulling data from a basic API:

function getCurrentState() {
    let fetchUrl = ''
    return window.fetch(fetchUrl)
    .then(response => response.json())
    .then(response => console.log(response.someKey))


This works with a promise which I'm not totally sure about how you would use it with a return, but this gets you there for a start.

The payload from the api should be:

{ someKey: "some Value"}