@rcp/util.iselemof
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@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, moyuyc95@gmail.com.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @rcp/util.iselemof

Weekly Downloads

11

Version

2.0.0

License

MIT

Unpacked Size

10.5 kB

Total Files

11

Last publish

Collaborators

  • moyuyc