The utility for determinate the input is element of the component class
npm install @rcp/util.iselemof
# or use yarn
yarn add @rcp/util.iselemof
import isElementOf from '@rcp/util.iselemof'
class Comp extends React.Component {}
isElementOf(Comp)(<Comp />) // true
Determinate the input is element of the component class
-
Component
React.ComponentType
- @rcp/util.iscompclass - The utility for checking react component class
This library is written and maintained by imcuttle, moyuyc95@gmail.com.
MIT