The main goal of this project is to practice javascript and learn react fundamentals.
todo: Time is chosen in UTC/GMT but displayed in local format
- Created a simple Nodejs script to fetch() data from api using hidden API KEY
- Stored API KEY in .env file and ensured its addition into .gitignore file
- Retrieved and parsed JSON data through Openweatherapi
- creating datetime objects through its constructor and epoch unix time from JSON objects
- retrieving information from said objects
- getDate(), getMonth(), etc...
- toLocaleTimeString()
- Defaulting to const and using var/let only with dynamic data
- Using arrow and callback functions mainly to practice syntax and deal with asynchronous behavior
- Passing in ${variables} to dynamically create strings
- Utilizing callback functions for success or catching failure
- Used create-react-app to simplify project setup
- Created basic classes for each component
- Utilized lifecycle methods such as componentDidMount() and render()
- Created card component without a class to be used within weather class
- Passed data via props to card component
- Learned to use hooks but since most of the code is class based, I utilized setState() instead