In the previous chapter, we looked at a couple of design patterns that we could use to build our applications. There are reasons for and against the use of Flux and Redux, but they generally improve the structure of React applications.
A good structure is essential for any large-scale application. Cobbling things together may work for small experiments, but design patterns are an integral part of maintaining anything larger. They do not say much in the way of creating extendable components, though. In this chapter, we're going to look at a few ways that we can use to make our components extendable by replacing them, injecting functionality, and composing interfaces from dynamic lists of components.
We're going to review a few related software design concepts and take a look at how they can assist us (and others) when we want to replace parts of our application with modified components and alternative implementations.