March 2017
Beginner to intermediate
500 pages
9h 41m
English
In this chapter, you'll learn how to add new capabilities to existing components by extending them. There are two React mechanisms that you can use to extend a component, and we'll look at each in turn:
We'll start by looking at basic component inheritance, just like the good old object-oriented class hierarchies that you're used to. Then we'll implement some higher-order components used as the ingredients in React component composition.
Components are just classes. In fact, when you implement a component using ES2015 class syntax, you extend the base Component class from React. You can keep on extending your classes like this to create ...
Read now
Unlock full access