Sample
Handle React.Children key rewriting, Fragment opacity, null return shapes in map, and cloneElement key string coercion traps in React
sha256:40432561f0a52d20a9a1ac819998ffd8ede83d0436787b49bcf7949a41cf71a9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Handle React.Children key rewriting, Fragment opacity, null return shapes in map, and cloneElement key string coercion traps in React HOW
- Packages
- react 19.0.0
- Environment
- node
- Created
- 2026-08-16T07:54:04Z
Contract
- assert React.Children.toArray rewrites user keys with '.$' prefix, assigns '.0' to unkeyed items, and recursively flattens nested arrays with index prefixes
- assert React.Children.toArray and Children.count treat React.Fragment as a single opaque element without unwrapping its children
- assert React.Children.toArray filters out null, undefined, and booleans while strictly preserving numeric 0 and empty string
- assert React.Children.map returns null or undefined on null or undefined input instead of an empty array, and flattens array return values
- assert React.Children.only throws on arrays (including single-item arrays) and primitives, requiring a single valid React element
- assert React.cloneElement preserves keys when passed key: undefined, coerces key: null to string 'null', and gives precedence to trailing children arguments
Files
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9