React Class vs. Functional Components

Definition, props, pure components, inner state, lifecycle, and performance for both class and functional components

Martin Novak
Better Programming
Published in
5 min readJun 24, 2021

--

cartoon turtle asking what is the difference between class and functional components
Original drawing by the author

React gives you a choice between using a more imperative code style with class components or using the more declarative functional approach with functional components.

--

--

Martin is a product manager at work, a software developer in his free time, and an entrepreneur at heart.