I am developing Weather App in React js using axios.I am using axios get method inside handleClick method.Is it ok to use like this.and here I deleted app key but I am using that in my project.
handleClick=()=>
{
this.setState({isClicked:true},()=>{
const url = `https://api.openweathermap.org/data/2.5/weather?q=${this.state.city}&cnt=${this.state.country}&appid=appKey`;
axios.get(url).then((resp)=>
{
this.setState({
temperature:resp.data.main.temp
})
})
})
}