Here is just a small piece of code to illustrate my problem. I want to store the data in the state object and access the data through the state object. But when I log the state object to the console I see all the data, when trying to access the data properties I get an undefined?
var state = {}
var weather = new Weather('Boston')
var getResults = async () => {
await weather.getData()
console.log(weather)
state.result = weather
}
getResults()
console.log(state) ------------------> logs all the data
console.log(state.result) ------------------> undefined