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.
Correct: A
The main difference is that functional components are written as JavaScript functions, while class components are written as ES6 classes. Functional components cannot have state, while class components can.
1 / 32