Answer the question
In order to leave comments, you need to log in
Is it correct to use vue computed like this?
DD, tell me, please, I re-read a couple of articles on this property, I seem to understand the differences from methods, but still the question is,
there is a request to the openWeather service, the answer is stored in the weatherResult variable and then it is displayed like this
<span>{{Math.round(weatherResult.main.temp)}}°C</span><br>
<span>{{weatherResult.weather[0].description}}</span><br>
<img :src="`https://openweathermap.org/img/wn/${weatherResult.weather[0].icon}@2x.png`" alt="">
<span>{{weatherResult.name}},{{weatherResult.sys.country}}</span>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question