Conclusion: DOM Elements and Polymorphic Components
Review the concepts we have covered in this chapter.
We'll cover the following
Concluding remarks
We’ve just explored different strategies for creating polymorphic components with React and TypeScript. Extending the properties of an HTML element makes it possible to create abstractions over that element with additional behavior. A polymorphic component is a single adaptable component representing different semantic HTML elements, with TypeScript automatically adjusting to these changes. The cool thing about this is that we can now universally add themes and other functionality to our application. These approaches work in most versions of TypeScript.
What’s next?
In the next section, we’ll examine some of the specific improvements the latest release of TypeScript offers and how we can use them to further improve the reliability and maintainability of our code.
Get hands-on with 1400+ tech skills courses.