Skip to content

DarkWool/weather-app

Repository files navigation

Weather app, view live

Assignment made for The Odin Project curriculum, with this project users can search for global weather data and we put into practice promises, async/await, fetch and in general how to make use of an API!

I even learned how to make use of the Geolocation API in conjunction with localStorage.

Things that I learned / put in practice:

  1. How to make use of an API.
  2. Make a better use of Promises.
  3. Better understanding of async/await
  4. Error handling with promises.
  5. How to import multiple files with webpack.
  6. Deal with custom dropdowns.
  7. To use 'high order functions' and why they can be amazing!
  8. How to use the Geolocation API

Specifications:

  1. Set up a blank HTML document with the appropriate links to your JavaScript and CSS files.
  2. Write the functions that hit the API. You’re going to want functions that can take a location and return the weather data for that location. For now, just console.log() the information.
  3. Write the functions that process the JSON data you’re getting from the API and return an object with only the data you require for your app.
  4. Set up a simple form that will let users input their location and will fetch the weather info (still just console.log() it).
  5. Display the information on your webpage!
  6. Add any styling you like!
  7. Optional: add a ‘loading’ component that displays from the time the form is submitted until the information comes back from the API.

Check the original page of the specifications here.

Credits: