Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix isClassComponent function #1571

merged 1 commit into from Oct 7, 2019


Copy link

commented Oct 7, 2019

Object.getPrototypeOf(component) returns React Component() function itself, not a prototype of Component but isReactComponent is a property of Component.prototype.

So correct check here is Component.prototype.isReactComponent not Component.isReactComponent.

`Object.getPrototypeOf(component)` returns React `function Component()` function itself, not `Component.prototype`.

This comment has been minimized.

Copy link

commented Oct 7, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 671a7c8:

Sandbox Source
angry-aryabhata-jboe9 Configuration
@tannerlinsley tannerlinsley merged commit 7c73a7a into tannerlinsley:master Oct 7, 2019
3 checks passed
3 checks passed
ci/codesandbox Building packages succeeded.
continuous-integration/travis-ci/pr The Travis CI build passed
deploy/netlify Deploy preview ready!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.