MCPcopy Index your code
hub / github.com/gajus/react-css-modules / isReactComponent

Function isReactComponent

src/index.js:14–16  ·  view source on GitHub ↗
(maybeReactComponent: any)

Source from the content-addressed store, hash-verified

12 * Determines if the given object has the signature of a class that inherits React.Component.
13 */
14const isReactComponent = (maybeReactComponent: any): boolean => {
15 return 'prototype' in maybeReactComponent && _.isFunction(maybeReactComponent.prototype.render);
16};
17
18/**
19 * When used as a function.

Callers 1

functionConstructorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected