Closed Oksana13 closed 2 years ago
It's better to keep all such logic in Actions, and you duplicates it there and uses Promise, so, here you can just use try catch block, it would be much cleaner
try catch
https://github.com/naveenkumarr05/weather-app/blob/89bbedf3d4fd693a7f39c6db777a1ad077478127/src/components/SearchField.vue#L54
Okay Got it
Updated logic
It's better to keep all such logic in Actions, and you duplicates it there and uses Promise, so, here you can just use
try catch
block, it would be much cleanerhttps://github.com/naveenkumarr05/weather-app/blob/89bbedf3d4fd693a7f39c6db777a1ad077478127/src/components/SearchField.vue#L54