How can I acces the values of my async fetch function? [duplicate]
问题 This question already has answers here : How do I return the response from an asynchronous call? (36 answers) Closed 12 months ago . I want to use my fetched values in another function I'm really new to JS. So until now I tried this.setState() and a return value of the function . async fetchData() { const url = 'http://localhost:8080'; const response = await fetch(url); const data = await response.json(); // stringify JSON var myJSON = JSON.stringify(data); // parsing to JS object var