React

Introduction to React - Difference between functio...

1.

What is the main difference between functional components and class components in React?

Functional components are written as JavaScript functions, while class components are written as ES6 classes.

Functional components can have state, while class components cannot.

Functional components are easier to write and understand, while class components are more complex.

There is no difference between functional and class components in React.

1 / 32

Next