Closed gstark closed 6 years ago
can refactor with class. tried adding new class for forecast data and have class get fetched data but got stumped. still working on though https://github.com/benjaminkent/weather/commits/oop-refactor, http://weather-benjaminjehl.surge.sh/
Today we'll be reviewing the weather app but converting it to React, so this may have resolve some questions
Your homework is: Meets Expectations
Yesterday you created a simple weather viewer. Today, we discussed a new topic,
Object Oriented Programing
. This involved the thought of abstraction and encapsulation (among other ideas). For tonight, refactor your code to use classes to encapsulate and abstract your code and ideas from yesterday.Objectives
Requirements
Explorer Mode
WeatherAPI
. It should have a view properties suchAPI_URL
and few methods such asgetWeatherByZipCode
addForecastToDOM
andgetUserInput
git push origin oop-refactor
Adventure Mode
DOMContentLoaded
. That method should be calledrender
Epic Mode