How to check if a component is a class component in React?
In this article, we will review a code snippet from TipTap source code.
/**
* Check if a component is a class component.
* @param Component
* @returns {boolean}
*/
function isClassComponent(Component: any) {
return !!(
typeof Component === ...
thinkthroo.com1 min read