The main difference is that when it is Component , React will run / add all life cycle methods . This will be useful if in your state component. When you use this component, React will create a React Component Instance to which all lifecycle methods and other hooks will be added.
class App extends React.Component{ ... }
In some cases, you will not use state . In these cases, the addition of all these life cycle methods is not required. So, React gives you a way to create a component that will only have render . It is called PureComponent . When you use this, there is no need to create a new Component Instance , because there are no life cycle methods. It will just be a function that can take props and return React elements.
class App extends React.PureComponent{ ... }
Hope this helps!
[Update]
What is Component and << 27>?
Technically, a Component in React is a class or function .
Example:
class App extends React.Component{ ... }
When you use this Component , it will be created, more like a new App() . But, React does it himself differently.
Example:
render(){ return <App/>
Instances are required because each instance can execute individually. Instances are a copy of the original class.
The simple answer is: components will be a class , and the Component Instance will be a copy / instance of the class and will be used in render
Hope this will explain!
Pranesh ravi
source share