2.0.0 • Published 2 months ago
@rcp/util.iselemof v2.0.0
@rcp/util.iselemof
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
- @rcp/util.iscompclass - The utility for checking react component class
Authors
This library is written and maintained by imcuttle, moyuyc95@gmail.com.
License
MIT