Lets start
So this time we are going to go over my experience with React in school so far. While react seems a whole lots easier to navigate and write out than vanilla Javascript( I say this only because vanilla Javascript was the bane of my existence), It was still difficult to get certain aspects of the app to become functional.
Photo by Jeff Sheldon on Unsplash
Into The Nitty Gritty
So getting into the code in the beginning, I was so confused as to what or rather where to even start. Do i start by making my components folders? Do i just go through and create each JS file and then figure out exactly what I need to do? Eh, I'll figure something out. Heading farther into the process, I ended up redoing this thing 3 time and to say This project was easy would be a lie. I drew out a game-plan of what exactly I wanted my app to do. This was going to be a recipe app that would allow you to add, edit, delete, and search recipes.I wanted to include the instructions for each recipe without it having to redirect to a separate page as well as the ingredients and a picture of the end result. This however did not end up being the case and I was only able to get the ingredients , title, and picture of the dish to populate due to having to switch between pages to actually get all the information down. Writing out the back-end server ended up not being too difficult to write out once I knew what I was trying to attain through it.
Photo by David Pupaza on Unsplash
Errors
One of the main errors I came across was trying to get my JSON server to connect to the actual app I was trying to create. When it came to trying to get it to host to Heroku it was a constant fight it seemed . First it wouldn't deploy, next it wasn't populating or updating any information and eventually it just was like nope. I had to reach out to some classmates to figure out what I was doing incorrectly. Come to find out that I didn't have the repo formatted corrected and and so the deploy I was trying for of course wouldn't work. The next issue I had was while I had all the coding done and could run the site on my local server with what seemed to be no issues or problems, It started to register just general warnings as full blown errors. I went back through my code and realized that I had entered an import that was not in use and so while it wasn't actually doing anything because it wasn't in use, it was trying to import a function into my app file that didn,t exist.
Photo by Oskar Yildiz on Unsplash
The Final Deploy
When the time came around to finally get the deploy to Netlify, the sigh of relief that came from me, even though the app did not include everything that I had initially expected it to, was amazing. Granted the styling I had planned to use during the project ended up slightly rushed due to a time restraint that was out of my control, the coding and functionality is what mattered.
Photo by Annie Spratt on Unsplash
What could have gone better
This phase a lot was learned when it came to functionality and how react was set to work. Some things I definitely need to continue working on is useEffect and useState. While using it in code seems to be simple enough, being able to actually describe what they do in plain words was difficult and my brain went completely blank. I learned so much just by going through and being able to troubleshoot my own code without the use of tests It started making \me much more confident as a developer.
Top comments (0)