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

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