Exploring the app

With all the code in place, we'll take a walk through the finished Dinosaur Search App and discuss the finer points

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the Beginner's Guide to Real World React course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to Beginner's Guide to Real World React, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course Beginner's Guide to Real World React

Lesson 5, exploring the dinosaur search app. We've put in a lot of hard work up to this point and all your knowledge of reactors letters here where we'll fire up both the API project and the Frontend React app. We'll have an explore through the pages, enter some data, save some dinosaurs' favourites and make sure everything's working as expected. Rest assured that the code we've been working along with has been tested and worked without any problems. That said, no system is ever 100% bug free and there are a lot of different variables of player here. Not least of all is that this is the most complex project we've built in the course and has the most moving parts. Your local system being different to others, you've entered the code whilst copying along with lessons, silly or minor errors present in the code to begin with and using the system in an unintended way or in a way that hasn't been cared for. React does a pretty good job of surfacing errors for us and you will usually find them in the terminals console or in the browser dev tools in the console area. For the API you'll have to rely on the terminal windows log for this as any errors that happen in the API side will be output here. Should the worst happen just restart the API with the yarn start command. If you come across errors and issues it's worth tracking back through the files and making sure that they match up with those from the course files. If you're still stuck and things aren't working as expected then you can always report the error to us here at Newline via the support email [email protected]. You can also check in on the error reporting information in module 1 lesson 4 reporting errors and getting to port. The best place to start is to run the API. I'm using VS code as my code editor and it has a nifty feature where I can split my terminal window, one side will run the client app and the other the API. Either way you'll need a fresh separate terminal window open, once there navigate to the server folder from the project root and run the following command. Yarn start. Nothing exciting will happen here but all things being equal you receive a message saying listening on port 4000. Once you see this message you'll know that the API is running and we can move on to the starting up the main client face in React app. With the API worrying away in the background let's navigate to the client folder from the project root in a new terminal window and use the same yarn command to start it . Yarn start. This time once the files are built and React is ready to go you'll see the main search component i.e. the home page displayed in your default system browser. Let's take a good look through the app and see how it works. I'm going to bypass searching for a dinosaur and hit the "I'm feeling lucky" button because you know what I am feeling lucky today. Look at that we've been taken to the browse root and shown a list of dinosaurs fetched from the API by the dino service. Because the "I'm feeling lucky" root to this page includes selecting a random character to search on your results will differ to mine here but hopefully you've got a similar result. However, I'm not happy with the choice made for me so I'm going to browse for dinosaurs whose name start with "R" just like mine am. I'm drawn to the "Rinchenia" here so I'm going to mark her as a favourite. Next I'm going to look at "K" because of my last name. This time I'm going to mark the "Kentrosaurus" as a favourite because it's almost like the "Kendelaurus" right? In fact let's take a look at the "Kentrosaurus" in more detail. I'll click on the "C" details button here and see a bigger picture and some top stats. Notice as well that since I've favourited this little guy when I've viewed the details for him, the favourite heart in the top right of the info box is already filled in indicating that he's firmly in my favourites list in our app state. Let's check out the favourites list to see what's what. First however I'll need to sign in. If I try to sign in with just a username we'll get a quick loading animation on the button as we talk to the API but then we'll get errors and a nice message telling us that there was a problem. Remember that the API is set up to only throw logging errors where either or both use an name and password at empty. Literally any value in both boxes will sign you in. If I try again with the password this time I'll be signed in and escorted to the home page where I can now view my favourites from the extra link in the navigation bar. Over on the favourites page we can see the "Kentrosaurus" and "Rincinia" sitting proudly amongst my top dinos. If I remove one then it's instantly removed from state via the Redux mechanisms we built early on in the module and now I'm left with a single dino in my top list. And this wraps up the "DinoSource" search app. There's just one more lesson to go where I share some heartfelt thanks for having you join me for the course and I'll offer some next steps and thoughts on additional learning paths to bolt on extra skills and round out your development profile as a front end of Fullstack Developer. I look forward to seeing you in the next lesson. [BLANK_AUDIO]