My First Steps in React!
React is probably the most common front-end JavaScript framework used in the industry today (at least among the job listings I've been looking at). The curriculum at Snow College is fairly heavily focused on the .NET stack, so I haven't had much of an opportunity to dig into JavaScript frameworks, but I want to learn, so I started building a simple application called 'Boop', which simply has a button you can click that changed from saying "Click Me" to "Boop" (as per my wife's request). This didn't take me too long, although I needed to figure out the best way to structure my App.js file. I used the base app that is create when you follow this simple tutorial, and I reused some the the CSS for simplicity.
After I found an API that would work correctly, everything else came fairly easily. I was able to make a fetch request to the endpoint which converted the result into Json. I even handled errors, which was helpful when ' The Office' API was returning unsuccessfully. The code is public on my GitHub, and you're welcome to check it out!
Comments
Post a Comment