Description
The React Native structuredClone polyfill handles boxed Boolean, Number, and String values but omits boxed BigInt. structuredClone(Object(1n)) therefore returns a plain empty object that is not a BigInt wrapper and has no usable primitive value.
Expected behavior
The clone should be a distinct boxed BigInt whose valueOf() matches the input. Native structuredClone follows this behavior.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All
Description
The React Native
structuredClonepolyfill handles boxed Boolean, Number, and String values but omits boxed BigInt.structuredClone(Object(1n))therefore returns a plain empty object that is not a BigInt wrapper and has no usable primitive value.Expected behavior
The clone should be a distinct boxed BigInt whose
valueOf()matches the input. NativestructuredClonefollows this behavior.React Native Version
0.87.1 and current main
Affected Platforms
JavaScript runtime - All