I'm trying to return data from a function but didn't get proper data
export const getApi = (url) => {
return fetch(url)
.then((response) => response.json())
.then((json) => {
console.log(json);
})
}
{"_U": 0, "_V": 0, "_W": null, "_X": null}
this is my response
i'm calling it here
componentDidMount(){
const data= getApi(banner)
console.log('data',data)
}