Sample
react-is 19.2.8
Verified sample for npm react-is 19.2.8. The contract ran on node 22 · linux alpine/x64 · docker and passed: isElement correctly identifies React 19…
sha256:1dc547c98d312ea1c2fc8a54ed00ca8e095de2783d472e4b7603aa6774cb4651
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-28 |
Case
HOW- Goal
- verify pkg:npm/react-is@19.2.8
- Packages
- Environment
- node 22.23.2
- Created
- 2026-08-28T08:40:23Z
Contract
- isElement correctly identifies React 19 transitional element objects and rejects plain objects or primitives
- isValidElementType validates built-in tags, component functions, classes, and React symbols
- isFragment detects React Fragment elements with react.fragment type
- isForwardRef detects elements created from react.forward_ref component types
- isMemo detects elements created from react.memo wrapped components
- isLazy detects elements created from react.lazy component types
- isPortal detects React Portal objects
- isProfiler detects React Profiler elements
- isStrictMode detects React StrictMode elements
- isSuspense detects React Suspense elements
- isSuspenseList detects React SuspenseList elements
- isContextConsumer detects elements created from react.consumer types
- isContextProvider detects elements created from react.context types
- typeOf returns standard React 19 type symbols for elements or undefined for non-elements
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- test/contract.mjs
Source
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:npm/react-is@19.2.8
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/react-is@19.2.8
Constraints:
- executionContext: node
Required runtime conditions:
- ecosystem: npm
- language: javascript
- moduleSystem: cjs
- packageManager: npm@10.9.8
- runtime: node@22.23.2
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:c6a88a23823e26ef5eaeeeb17ba304d0c873c905e55f1d23da82fc048d11c5fa","constraints":{"executionContext":"node"},"contract":["isElement correctly identifies React 19 transitional element objects and rejects plain objects or primitives","isValidElementType validates built-in tags, component functions, classes, and React symbols","isFragment detects React Fragment elements with react.fragment type","isForwardRef detects elements created from react.forward_ref component types","isMemo detects elements created from react.memo wrapped components","isLazy detects elements created from react.lazy component types","isPortal detects React Portal objects","isProfiler detects React Profiler elements","isStrictMode detects React StrictMode elements","isSuspense detects React Suspense elements","isSuspenseList detects React SuspenseList elements","isContextConsumer detects elements created from react.consumer types","isContextProvider detects elements created from react.context types","typeOf returns standard React 19 type symbols for elements or undefined for non-elements"],"goal":"verify pkg:npm/react-is@19.2.8","kind":"HOW","packages":["pkg:npm/react-is@19.2.8"],"schemaVersion":1},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/react-is@19.2.8"],"schemaVersion":1,"subject":"pkg:npm/react-is@19.2.8","verifierAdapter":"node-typescript@1"}
{
"name": "sample-react-is",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-react-is",
"version": "1.0.0",
"dependencies": {
"react-is": "19.2.8"
}
},
"node_modules/react-is": {
"version": "19.2.8",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.8.tgz",
"integrity": "sha512-s5un28nYxKJw5gvUHyW5PCC28CvBqLu9r3cWgzHT4Vo/5fqqkFcdRYsGcKf50WMPpjjFZS5d76fn3YCo2njKwQ==",
"license": "MIT"
}
}
}
{
"name": "sample-react-is",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification of react-is element and component type identification in React 19",
"type": "module",
"main": "src/index.js",
"dependencies": {
"react-is": "19.2.8"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/react-is@19.2.8",
"kind": "HOW",
"packages": [
"pkg:npm/react-is@19.2.8"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
import {
isElement,
isValidElementType,
isFragment,
isForwardRef,
isMemo,
isLazy,
isPortal,
isProfiler,
isStrictMode,
isSuspense,
isSuspenseList,
isContextConsumer,
isContextProvider,
typeOf,
ContextConsumer,
ContextProvider,
Element,
ForwardRef,
Fragment,
Lazy,
Memo,
Portal,
Profiler,
StrictMode,
Suspense,
SuspenseList,
} from 'react-is';
/**
* Check if the given value is a valid React element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a React element.
*/
export function checkIsElement(value) {
return isElement(value);
}
/**
* Check if the given value is a valid React element type.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a valid element type.
*/
export function checkIsValidElementType(value) {
return isValidElementType(value);
}
/**
* Check if the given value is a React Fragment element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Fragment element.
*/
export function checkIsFragment(value) {
return isFragment(value);
}
/**
* Check if the given value is a React ForwardRef element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a ForwardRef element.
*/
export function checkIsForwardRef(value) {
return isForwardRef(value);
}
/**
* Check if the given value is a React Memo element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Memo element.
*/
export function checkIsMemo(value) {
return isMemo(value);
}
/**
* Check if the given value is a React Lazy element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Lazy element.
*/
export function checkIsLazy(value) {
return isLazy(value);
}
/**
* Check if the given value is a React Portal object.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Portal object.
*/
export function checkIsPortal(value) {
return isPortal(value);
}
/**
* Check if the given value is a React Profiler element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Profiler element.
*/
export function checkIsProfiler(value) {
return isProfiler(value);
}
/**
* Check if the given value is a React StrictMode element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a StrictMode element.
*/
export function checkIsStrictMode(value) {
return isStrictMode(value);
}
/**
* Check if the given value is a React Suspense element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Suspense element.
*/
export function checkIsSuspense(value) {
return isSuspense(value);
}
/**
* Check if the given value is a React SuspenseList element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a SuspenseList element.
*/
export function checkIsSuspenseList(value) {
return isSuspenseList(value);
}
/**
* Check if the given value is a React Context Consumer element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Context Consumer element.
*/
export function checkIsContextConsumer(value) {
return isContextConsumer(value);
}
/**
* Check if the given value is a React Context Provider element.
*
* @param {*} value - The value to check.
* @returns {boolean} True if the value is a Context Provider element.
*/
export function checkIsContextProvider(value) {
return isContextProvider(value);
}
/**
* Identify the React element type symbol of a given object.
*
* @param {*} value - The React element to inspect.
* @returns {symbol|undefined} The matched React symbol or undefined.
*/
export function identifyTypeOf(value) {
return typeOf(value);
}
export {
isElement,
isValidElementType,
isFragment,
isForwardRef,
isMemo,
isLazy,
isPortal,
isProfiler,
isStrictMode,
isSuspense,
isSuspenseList,
isContextConsumer,
isContextProvider,
typeOf,
ContextConsumer,
ContextProvider,
Element,
ForwardRef,
Fragment,
Lazy,
Memo,
Portal,
Profiler,
StrictMode,
Suspense,
SuspenseList,
};
import assert from 'node:assert/strict';
import {
checkIsElement,
checkIsValidElementType,
checkIsFragment,
checkIsForwardRef,
checkIsMemo,
checkIsLazy,
checkIsPortal,
checkIsProfiler,
checkIsStrictMode,
checkIsSuspense,
checkIsSuspenseList,
checkIsContextConsumer,
checkIsContextProvider,
identifyTypeOf,
isElement,
isValidElementType,
isFragment,
isForwardRef,
isMemo,
isLazy,
isPortal,
isProfiler,
isStrictMode,
isSuspense,
isSuspenseList,
isContextConsumer,
isContextProvider,
typeOf,
ContextConsumer,
ContextProvider,
Element,
ForwardRef,
Fragment,
Lazy,
Memo,
Portal,
Profiler,
StrictMode,
Suspense,
SuspenseList,
} from '../src/index.js';
// 1. Function and Symbol exports verification
assert.equal(typeof isElement, 'function', 'isElement should be a function');
assert.equal(typeof isValidElementType, 'function', 'isValidElementType should be a function');
assert.equal(typeof isFragment, 'function', 'isFragment should be a function');
assert.equal(typeof isForwardRef, 'function', 'isForwardRef should be a function');
assert.equal(typeof isMemo, 'function', 'isMemo should be a function');
assert.equal(typeof isLazy, 'function', 'isLazy should be a function');
assert.equal(typeof isPortal, 'function', 'isPortal should be a function');
assert.equal(typeof isProfiler, 'function', 'isProfiler should be a function');
assert.equal(typeof isStrictMode, 'function', 'isStrictMode should be a function');
assert.equal(typeof isSuspense, 'function', 'isSuspense should be a function');
assert.equal(typeof isSuspenseList, 'function', 'isSuspenseList should be a function');
assert.equal(typeof isContextConsumer, 'function', 'isContextConsumer should be a function');
assert.equal(typeof isContextProvider, 'function', 'isContextProvider should be a function');
assert.equal(typeof typeOf, 'function', 'typeOf should be a function');
assert.equal(typeof Element, 'symbol', 'Element symbol must be exported');
assert.equal(typeof Fragment, 'symbol', 'Fragment symbol must be exported');
assert.equal(typeof ForwardRef, 'symbol', 'ForwardRef symbol must be exported');
assert.equal(typeof Memo, 'symbol', 'Memo symbol must be exported');
assert.equal(typeof Lazy, 'symbol', 'Lazy symbol must be exported');
assert.equal(typeof Portal, 'symbol', 'Portal symbol must be exported');
assert.equal(typeof Profiler, 'symbol', 'Profiler symbol must be exported');
assert.equal(typeof StrictMode, 'symbol', 'StrictMode symbol must be exported');
assert.equal(typeof Suspense, 'symbol', 'Suspense symbol must be exported');
assert.equal(typeof SuspenseList, 'symbol', 'SuspenseList symbol must be exported');
assert.equal(typeof ContextConsumer, 'symbol', 'ContextConsumer symbol must be exported');
assert.equal(typeof ContextProvider, 'symbol', 'ContextProvider symbol must be exported');
// 2. React 19 Element detection (react.transitional.element)
const react19Element = {
$$typeof: Symbol.for('react.transitional.element'),
type: 'div',
props: { className: 'app' },
key: null,
ref: null,
};
assert.equal(isElement(react19Element), true, 'React 19 element must be identified by isElement');
assert.equal(checkIsElement(react19Element), true, 'checkIsElement helper must return true');
assert.equal(isElement({}), false, 'Empty object is not a React element');
assert.equal(isElement(null), false, 'null is not a React element');
assert.equal(isElement(undefined), false, 'undefined is not a React element');
assert.equal(isElement('div'), false, 'string is not a React element');
assert.equal(isElement(123), false, 'number is not a React element');
// 3. Valid element type detection
assert.equal(isValidElementType('div'), true, 'String tag names are valid element types');
assert.equal(isValidElementType('custom-element'), true, 'Custom elements are valid element types');
assert.equal(isValidElementType(() => null), true, 'Function components are valid element types');
assert.equal(isValidElementType(class {}), true, 'Class components are valid element types');
assert.equal(isValidElementType(Symbol.for('react.fragment')), true, 'Fragment symbol is a valid element type');
assert.equal(isValidElementType(123), false, 'Numbers are not valid element types');
assert.equal(isValidElementType(null), false, 'null is not a valid element type');
assert.equal(isValidElementType(undefined), false, 'undefined is not a valid element type');
// 4. Fragment element detection
const fragmentElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: Symbol.for('react.fragment'),
props: { children: [] },
key: null,
ref: null,
};
assert.equal(isFragment(fragmentElement), true, 'Fragment element must be identified by isFragment');
assert.equal(checkIsFragment(fragmentElement), true, 'checkIsFragment helper must return true');
assert.equal(isFragment(react19Element), false, 'Regular element is not a Fragment');
// 5. ForwardRef element detection
const forwardRefType = {
$$typeof: Symbol.for('react.forward_ref'),
render: (props, ref) => null,
};
const forwardRefElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: forwardRefType,
props: {},
key: null,
ref: null,
};
assert.equal(isForwardRef(forwardRefElement), true, 'ForwardRef element must be identified by isForwardRef');
assert.equal(checkIsForwardRef(forwardRefElement), true, 'checkIsForwardRef helper must return true');
assert.equal(isForwardRef(react19Element), false, 'Regular element is not a ForwardRef');
// 6. Memo element detection
const memoType = {
$$typeof: Symbol.for('react.memo'),
type: 'span',
compare: null,
};
const memoElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: memoType,
props: {},
key: null,
ref: null,
};
assert.equal(isMemo(memoElement), true, 'Memo element must be identified by isMemo');
assert.equal(checkIsMemo(memoElement), true, 'checkIsMemo helper must return true');
assert.equal(isMemo(react19Element), false, 'Regular element is not a Memo');
// 7. Lazy element detection
const lazyType = {
$$typeof: Symbol.for('react.lazy'),
_payload: {},
_init: () => {},
};
const lazyElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: lazyType,
props: {},
key: null,
ref: null,
};
assert.equal(isLazy(lazyElement), true, 'Lazy element must be identified by isLazy');
assert.equal(checkIsLazy(lazyElement), true, 'checkIsLazy helper must return true');
assert.equal(isLazy(react19Element), false, 'Regular element is not a Lazy element');
// 8. Portal object detection
const portalObject = {
$$typeof: Symbol.for('react.portal'),
key: null,
children: [],
containerInfo: {},
};
assert.equal(isPortal(portalObject), true, 'Portal object must be identified by isPortal');
assert.equal(checkIsPortal(portalObject), true, 'checkIsPortal helper must return true');
assert.equal(isPortal(react19Element), false, 'Regular element is not a Portal');
// 9. Profiler element detection
const profilerElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: Symbol.for('react.profiler'),
props: { id: 'test', onRender: () => {} },
key: null,
ref: null,
};
assert.equal(isProfiler(profilerElement), true, 'Profiler element must be identified by isProfiler');
assert.equal(checkIsProfiler(profilerElement), true, 'checkIsProfiler helper must return true');
assert.equal(isProfiler(react19Element), false, 'Regular element is not a Profiler');
// 10. StrictMode element detection
const strictModeElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: Symbol.for('react.strict_mode'),
props: { children: [] },
key: null,
ref: null,
};
assert.equal(isStrictMode(strictModeElement), true, 'StrictMode element must be identified by isStrictMode');
assert.equal(checkIsStrictMode(strictModeElement), true, 'checkIsStrictMode helper must return true');
assert.equal(isStrictMode(react19Element), false, 'Regular element is not StrictMode');
// 11. Suspense element detection
const suspenseElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: Symbol.for('react.suspense'),
props: { fallback: null },
key: null,
ref: null,
};
assert.equal(isSuspense(suspenseElement), true, 'Suspense element must be identified by isSuspense');
assert.equal(checkIsSuspense(suspenseElement), true, 'checkIsSuspense helper must return true');
assert.equal(isSuspense(react19Element), false, 'Regular element is not Suspense');
// 12. SuspenseList element detection
const suspenseListElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: Symbol.for('react.suspense_list'),
props: { children: [] },
key: null,
ref: null,
};
assert.equal(isSuspenseList(suspenseListElement), true, 'SuspenseList element must be identified by isSuspenseList');
assert.equal(checkIsSuspenseList(suspenseListElement), true, 'checkIsSuspenseList helper must return true');
assert.equal(isSuspenseList(react19Element), false, 'Regular element is not SuspenseList');
// 13. Context Consumer detection
const contextConsumerType = {
$$typeof: Symbol.for('react.consumer'),
_context: {},
};
const contextConsumerElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: contextConsumerType,
props: {},
key: null,
ref: null,
};
assert.equal(isContextConsumer(contextConsumerElement), true, 'Context Consumer element must be identified by isContextConsumer');
assert.equal(checkIsContextConsumer(contextConsumerElement), true, 'checkIsContextConsumer helper must return true');
assert.equal(isContextConsumer(react19Element), false, 'Regular element is not a Context Consumer');
// 14. Context Provider detection (react.context in React 19)
const contextType = {
$$typeof: Symbol.for('react.context'),
_currentValue: null,
};
const contextProviderElement = {
$$typeof: Symbol.for('react.transitional.element'),
type: contextType,
props: {},
key: null,
ref: null,
};
assert.equal(isContextProvider(contextProviderElement), true, 'Context Provider element must be identified by isContextProvider');
assert.equal(checkIsContextProvider(contextProviderElement), true, 'checkIsContextProvider helper must return true');
assert.equal(isContextProvider(react19Element), false, 'Regular element is not a Context Provider');
// 15. typeOf inspection
assert.equal(typeOf(react19Element), Element, 'typeOf(react19Element) must equal Element symbol');
assert.equal(identifyTypeOf(react19Element), Element, 'identifyTypeOf helper must return Element symbol');
assert.equal(typeOf(fragmentElement), Fragment, 'typeOf(fragmentElement) must equal Fragment symbol');
assert.equal(typeOf(forwardRefElement), ForwardRef, 'typeOf(forwardRefElement) must equal ForwardRef symbol');
assert.equal(typeOf(memoElement), Memo, 'typeOf(memoElement) must equal Memo symbol');
assert.equal(typeOf(lazyElement), Lazy, 'typeOf(lazyElement) must equal Lazy symbol');
assert.equal(typeOf(portalObject), Portal, 'typeOf(portalObject) must equal Portal symbol');
assert.equal(typeOf(profilerElement), Profiler, 'typeOf(profilerElement) must equal Profiler symbol');
assert.equal(typeOf(strictModeElement), StrictMode, 'typeOf(strictModeElement) must equal StrictMode symbol');
assert.equal(typeOf(suspenseElement), Suspense, 'typeOf(suspenseElement) must equal Suspense symbol');
assert.equal(typeOf(suspenseListElement), SuspenseList, 'typeOf(suspenseListElement) must equal SuspenseList symbol');
assert.equal(typeOf(contextConsumerElement), ContextConsumer, 'typeOf(contextConsumerElement) must equal ContextConsumer symbol');
assert.equal(typeOf(contextProviderElement), ContextProvider, 'typeOf(contextProviderElement) must equal ContextProvider symbol');
assert.equal(typeOf({}), undefined, 'typeOf on non-element must return undefined');
console.log('All contract assertions passed successfully for react-is@19.2.8.');
Origin Seeder
anonymous