Determines if the provided Object is a valid React component.
Argument | Type | Description |
---|---|---|
Component |
React.Component |
The "React component". |
boolean
: Whether the provided object was a React component or not.
import React from 'react'
import isReactComponent from '@helpscout/react-utils/dist/isReactComponent'
class Kip extends React.Component {...}
isReactComponent(Kip)
// true