isReactFragment
Checks whether x is the React Fragment token or a React element whose type is Fragment.
- @param
x- Value to check - @returns
truefor theFragmenttoken or a fragment element,falseotherwise.
Example
import { isReactFragment } from '@noaignite/react-utils'
import { Fragment } from 'react'
isReactFragment(Fragment) // true
isReactFragment(<><span>Hello</span></>) // true
isReactFragment(<div />) // false