Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 497 Bytes

isreactcomponent.md

File metadata and controls

26 lines (16 loc) · 497 Bytes

isReactComponent

Determines if the provided Object is a valid React component.

Arguments

Argument Type Description
Component React.Component The "React component".

Returns

boolean: Whether the provided object was a React component or not.

Examples

import React from 'react'
import isReactComponent from '@helpscout/react-utils/dist/isReactComponent'

class Kip extends React.Component {...}

isReactComponent(Kip)
// true