0

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.

4
  • there is class component concept in react 16 but not in react 18. Commented Feb 16, 2024 at 9:46
  • Maybe I am not sure anyway classes was the old way, functional components are newer. I suggest you focus on the later now. If still interested about the differences check above link or other sources. Commented Feb 16, 2024 at 9:52
  • Pure components were also related to classes: react.dev/reference/react/PureComponent Commented Feb 16, 2024 at 9:53
  • i will definitely check out , thank you Giorgi . Commented Feb 16, 2024 at 9:54

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.