From the course: React Foundations by Pearson
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Lab solution: Introduction to routing - React.js Tutorial
From the course: React Foundations by Pearson
Lab solution: Introduction to routing
Okay, well, I'm going to take you through the solution now for Lab 9. Quite a tough lab, but worthwhile, I think. So I'm going to run the application first, just to remind you how it works, and then we'll step through the code together. Okay, so here I am, react-dev-solutions-09-try-lingo-app, I'll open up a command window in that folder and start the application. So here I am npm run dev. So this is the home component which just has a nice link with some beautiful styling and to get started. So that'll take me to the French component where I can guess some French words. Bleu. And that's enough of that. Let's go to the German component. Oh well, I know the Welsh word for dragon is draig, but I'm guessing it's different in German. Okay, enough. Italian? Son? Again, I don't know. Is it canu? No. Well, okay, let's go back to the home page. And there we are. So that's a whiz through the application. Let's go through the code together. So I'm going to open up the Trilingo app in the code…
Contents
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Learning objectives1m 15s
-
(Locked)
Overview of single page applications (SPAs) and routing6m 49s
-
(Locked)
Running a sample application that uses routing5m 35s
-
(Locked)
Defining routes10m 59s
-
(Locked)
Defining a common layout7m 9s
-
(Locked)
Taking a closer look at the components in the example application5m 40s
-
(Locked)
Lab: introduction to routing27m 43s
-
(Locked)
Lab solution: Introduction to routing12m 23s
-
(Locked)
-
-
-
-