I have fetched data from the OpenWeatherAPI and did setState to set or store the data i receive from the API in my weather object in the code everything is okay what am trying to do is get the data in the weather object in my state and pass it to my f7params data app root function in my dataFromApi and then render it in another component but i have no idea on how i can do that please help
this.state = {
// Framework7 Parameters
f7params: {
id: 'io.emmanuelhaankwenda.weatherapp', // App bundle ID
name: 'Weather App', // App name
theme: 'auto', // Automatic theme detection
// App root data
data: function () {
return {
dataFromApi: "Weather Data",
};
},
// App routes
routes: routes,
// Input settings
input: {
scrollIntoViewOnFocus: !!this.$device.cordova,
scrollIntoViewCentered: !!this.$device.cordova,
},
// Cordova Statusbar settings
statusbar: {
overlay: this.$device.cordova && this.$device.ios || 'auto',
iosOverlaysWebView: true,
androidOverlaysWebView: false,
},
},
hello: "Emmanuel",
isLoading: true,
weather: {},
error: null
}
this.fetchWeather = this.fetchWeather.bind(this)
this.drawWeather = this.drawWeather.bind(this)
}