As I mentioned in my previous post, I am working on converting the JavaScript SPA I made for the JS Portfolio Project to a React APP.
In the spirit of always learning and improving my skills, for one of my first post-graduation projects, I will be improving the Component Calculator app I made for the JavaScript Portfolio Project. (knowledge of circuit-boards is not necessary for the purpose of this post, however if you are curious look here
For the CLI portfolio project I decided to make a simple CLI weather app using the National Weather Service (NWS) as a data source. The NWS provides an API that accepts coordinates (lat. & long.), and returns the name of the weather grid that encompasses that location. Using a separate endpoint from the NWS API, that weather grid can then be used to find various types of weather forecasts for that area. Seems simple enough, but there’s one problem: How do I find the coordinates of the location I’m trying to get a forecast for? The NWS API does not have that functionality.
After finishing the lessons on React/Redux, I felt confident that I was familiar enough with the concepts to churn out the portfolio project with ease. I started by attempting to set up the directory structure of my program and I was already lost. The React framework does not give recommendations or best practices regarding directory structure, but rather encourages users to set things up the way they see fit. The problem was that I had no experience setting up a React app–sure, we came across a few in the lessons, but those were already set up, or instructed us on how to set it up. I turned to Google to find some more information and was met with an overload of contradicting opinions, new standards, new versions of React, Redux, React-Redux and no single, authoritative source of information.
I began the Javascript Portfolio Project by following the provided guide for setting up the structure of a JavaScript/Rails application. Everything was going smoothly–I created a new Rails API-only application in my ‘backend’ directory, and added the necessary files (html, js, css) to the frontend directory. At this point, nothing was app-specific, meaning I was simply setting up a blank structure.