Skip to Content
react-utilsisReactFragment

isReactFragment

See source on Github 

Checks whether x is of type Fragment.

  • @param x - Value to check
  • @returns true if x is a Fragment, false otherwise.

Example

const value = <></> isReactFragment(value) // true