class
is syntactic sugar that abstracts prototypal inheritance, making it appear more familiar to those coming from languages with classical inheritance, but does not actually introduce a classical object-oriented inheritance model.
So, it’s basically a LIE.
React docs recommend AGAINST using inheritance to share functionality anyway
So why did they introduce class based components??