# How Does React Tell a Class from a Function?

DevFeed: [How Does React Tell a Class from a Function?](<https://devfeed.tech/articles/how-does-react-tell-a-class-from-a-function-36169.md>)

Original publisher: [Read original article](<https://overreacted.io/how-does-react-tell-a-class-from-a-function/>)

Published: 2018-12-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dan Abramov](<https://devfeed.tech/sources/dan-abramov.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [function](<https://devfeed.tech/tags/function.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [react](<https://devfeed.tech/tags/react.md>)

## AI overview

This article explains how React distinguishes function components from class components and why it must handle them differently. It uses JavaScript concepts including new, instanceof, prototype chains, and this to describe the underlying behavior.

## Source excerpt

We talk about classes, new, instanceof, prototype chains, and API design.