react-is

The react-is library provides utilities for validating whether React elements match specific types or formats. This is useful for type-checking elements, components, and fragments, among others.

Latest Ver 19.0.0
Homepage
Github
0
235,032
📢 Library for checking types of React elements
License: MIT
https://cdnjs.cloudflare.com/ajax/libs/react-is/19.0.0/cjs/react-is.development.js
https://cdnjs.cloudflare.com/ajax/libs/react-is/19.0.0/cjs/react-is.development.min.js
https://cdnjs.cloudflare.com/ajax/libs/react-is/19.0.0/cjs/react-is.production.js
https://cdnjs.cloudflare.com/ajax/libs/react-is/19.0.0/cjs/react-is.production.min.js

Sample Code

⚠️ Some code, including import statements, may not run properly on jsFiddle. If it fails to execute, please copy the code and try it in your own environment.
⚙️ JavaScript
import { isElement, isValidElementType, isFragment } from 'react-is';

const element = <div />;
console.log(isElement(element)); // true
console.log(isValidElementType(element)); // false
console.log(isFragment(<></>)); // true
⚡ Top Tools for Developers
Text Compare

Text Comparison

Easily spot the differences between two texts.

Favicon Generator

Favicon Generator

Quickly and easily generate favicons.

Lorem Ipsum Generator

Lorem Ipsum Generator

Generate placeholder text for your designs.

Character Counter

Character Counter

Check character and word count in real time.

SRT ↔ SMI

SRT ↔ SMI Converter

Easily convert between subtitle formats.

Text Extract(OCR)

Image Text Extractor

Automatically extract text from images.