weather app react
code

Weather App React

Weather App React is a client side rendering application that fetches data from two sources that provide JSON data about weather all around the world. Using React, the client side code will fetch your location and provide you with the weather in your area in a formatted way that is readable and accessible to the user of the application

Goal

The goal to building this application was to show case my skills in Javascript, React, managing API requests and the data that comes along with calling a detailed and very complex API.

To do this, current, daily & hourly weather data was split between 3 components of the like to manage state and organize the structure.

Challenges

  1. What data should the interface consist of??
  2. What UI will give an appealing but simplistic look and feel??
  3. How will the code remain clean with a pluthera of variables to cosider??

These top 3 concerns built the foundation behind this application that triggered the motivation behind structuring and organization. These two important aspects were of top priority.

Data Structuring

Within one API request all current, hourly & daily information is retrieved. This data was split between relative components that live within < App />

UI/UX

A user interface that is filled with light animations and is considerate to the daytime hours in one's current area where of top concern. The hours of daylight were calculated comparatively to the new Date() method & the sunset and sunrise data provided by the API.

Orginization

The file structure was to remain simple and small. This is a SPA application and no routers, context or state management libraries were necessary. The file structure lays out as follows...

- public
  - index.html
- assets
  - svgs
  - images
- src
  - components
    - File.jsx
    - file.scss
  - App.jsx
  - App.scss
  - index.jsx

Purpose

The leading motivation for building this application was to introduce my brain to more advanced levels of handling data and minipulating state with React, to provide people with a real example of a complex system of data management to refer to when creating their own works of art, and to create an application that is useful and easy for the public to use.

Date Started: Dec 27, 2022

Date Finished: Jan 12, 2023

What Is Next??

  1. Complete UI
  2. Add more SVG icons
  3. Clean up logic

Dependencies

  1. React
  2. Sass
  3. Framer Motion

Technologies

React

SASS