Find the perfect coding resourcesLearn more

Learn Class Components in React

ScrimbaScrimba
Recommended
Meet Your Instructor
Bob Ziroll avatar

Bob Ziroll

Instructor

Head of Education at Scrimba. Passionate about learning and helping others achieve their career goals. Enjoys tennis, woodworking, and spending time with family.

1h 20m

Completion

Certificate included

Format

Interactive coding

Free

What You'll Learn

ES6 classes review and fundamentals

Introduction to class components in React

State management in class components

Setting and updating state with setState

Constructor method in class components

Overview

Bob Ziroll is back with a one-hour whistle-stop tour of class components in React. Although modern React tends to use functional components, knowledge of class components remains a useful skill to have in your toolbox. You might find yourself dealing with legacy code, or a colleague who prefers them. The difference between functional and class components might come up in an interview. In this free, one-hour course, Scrimba Head of Education takes you through the essential basics of class components with a collection of interactive challenges designed to get you coding as much as possible. This approach leaves you with rock-solid knowledge which really sticks. In the course, we'll look at what class components are, state in classes components, the constructor method, updating complex state, lifecycle methods, and more!

Table of Contents
1
Class Components Section Intro
2
ES6 classes review
3
Intro to class components
4
Class components practice
5
State in class components
6
Setting state in class components
7
Challenge: convert to a class component with state
8
Constructor method in class components
9
Challenge: constructor method
10
Updating complex state with this.setState()
11
Lifecycle Methods Intro
12
Lifecycle methods: componentDidMount() 👶
13
Lifecycle methods: componentDidUpdate() part 1 ✏️
14
Lifecycle methods: componentDidUpdate() part 2 ✏️
15
Lifecycle methods: componentWillUnmount() 🪦
16
Other Lifecycle Methods
17
Certificate of Completion

Share Your Experience

Sign in to leave a review and help others

No reviews yet. Be the first to review!