Skip to content

Latest commit

 

History

History

util.iselemof

@rcp/util.iselemof

NPM version NPM Downloads

The utility for determinate the input is element of the component class

Installation

npm install @rcp/util.iselemof
# or use yarn
yarn add @rcp/util.iselemof

Usage

import isElementOf from '@rcp/util.iselemof'

class Comp extends React.Component {}
isElementOf(Comp)(<Comp />) // true

API

isElementOf

Determinate the input is element of the component class

Parameters

  • Component React.ComponentType

Related

Authors

This library is written and maintained by imcuttle, [email protected].

License

MIT