method

React
Types of components include functional and class.
Web components
Types of components include custom elements, shadow DOM, and templates.