Pregunta de entrevista de Availity

(React) What is the difference between a class component and a functional component?

Respuesta de la entrevista

Anónimo

6 may 2020

Class: extends React.Component, can have a constructor, uses lifecycle methods Functional: the new way, pure JS function, no constructor, uses hooks instead of lifecycle methods