From the course: React Foundations by Pearson
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Lab: creating class-based components - React.js Tutorial
From the course: React Foundations by Pearson
Lab: creating class-based components
Okay, so time for a lab. Let's go through the exercises for the lab for lesson two. In this lab, if you'd like to have a go, the idea is to refactor the library web application from the previous lab. Remember the one that had books and films? You're going to refactor that to use components. Rather than having one giant piece of code that renders the whole information all at once, you'll have a separate component to take care of some of the detail. So this is where the code is located. The starter code is in React Dev Student, O2 class components. The full solution is in React Dev Solutions, O2 class components. So if you go into React Dev Student, lesson 2, That's the starter code, which we will have a look at in a minute. And if you go into React Dev Solutions for Lesson 2, this is the solution, the full solution for the whole lab. Okay, so let's discuss what's actually coming up in this lab. Here's a roadmap of the exercises. In Exercise 1, I just run through the solution web page…
Contents
-
-
-
-
(Locked)
Learning objectives48s
-
(Locked)
The need for components3m 41s
-
(Locked)
Defining and using a class-based component9m 49s
-
(Locked)
Creating a more ambitious user interface7m 43s
-
(Locked)
Passing properties to a class-based component10m 12s
-
(Locked)
Lab: creating class-based components13m 43s
-
(Locked)
Lab solution: Creating class-based components20m 41s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-