Difference between “function component” and “class component”

Photo by Nikola Johnny Mirkovic on Unsplash

Different usage of “State”.

Class Component

Function components