What is difference Between Functional component , pure class component in React?

173 Views Asked by At

I am trying to understand when to use React pure components and regular components.

Components come in two types, Class components and Function components.

iam confused by these words class component, function component, react component.

can any one else explain for this question.

1

There are 1 best solutions below

0
Viltorn On BEST ANSWER

Class components are looks and behave like classes in JS, they can inherit other classes etc. Function components looks like JS function - you can read more about that in official documentation. Regarding using: it's modern and common approach just use functional components in new projects.