mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
36 lines
786 B
JavaScript
36 lines
786 B
JavaScript
// @flow
|
|
|
|
import React from 'react';
|
|
import Immutable from 'immutable';
|
|
|
|
const set = new Set(['abc', 123]);
|
|
const map = new Map([['name', 'Brian'], ['food', 'sushi']]);
|
|
const setOfSets = new Set([new Set(['a', 'b', 'c']), new Set([1, 2, 3])]);
|
|
const mapOfMaps = new Map([['first', map], ['second', map]]);
|
|
const typedArray = Int8Array.from([100, -100, 0]);
|
|
const immutable = Immutable.fromJS({
|
|
a: [{ hello: 'there' }, 'fixed', true],
|
|
b: 123,
|
|
c: {
|
|
'1': 'xyz',
|
|
xyz: 1,
|
|
},
|
|
});
|
|
|
|
export default function UnserializableProps() {
|
|
return (
|
|
<ChildComponent
|
|
map={map}
|
|
set={set}
|
|
mapOfMaps={mapOfMaps}
|
|
setOfSets={setOfSets}
|
|
typedArray={typedArray}
|
|
immutable={immutable}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ChildComponent(props: any) {
|
|
return null;
|
|
}
|