---
title: "Discussion on \"How to check if a component is a class component in React?\" | Hashnode"
description: "Discussion on \"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.\n/**\n * Check if a component is a class component.\n * @param Component\n * @returns {boolean}\n */\nfunction isClassComponent(Component: any) {\n  return !!(\n    typeof Component === ..."
url: "https://hashnode.com/posts/how-to-check-if-a-component-is-a-class-component-in-react/67987ad4a6cce6da6c9e6fda"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to check if a component is a class component in React?](https://thinkthroo.com/blog/how-to-check-if-a-component-is-a-class-component-in-react?utm_source=hashnode&utm_medium=feed)

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 === ...

Jan 28, 2025 · 1 min read · thinkthroo.com  
Updated Apr 3, 2025  
Read the article

-   [#classcomponent](https://hashnode.com/tag/classcomponent)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#tiptap](https://hashnode.com/tag/tiptap)

## Written by

[Ramu Narasinga](https://hashnode.com/@ramunarasinga)

@ramunarasinga · India

  
[View profile](https://hashnode.com/@ramunarasinga)

I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
