mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
20 lines
313 B
JavaScript
20 lines
313 B
JavaScript
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
const set = new Set();
|
|
set.add('abc');
|
|
set.add(123);
|
|
|
|
const map = new Map();
|
|
map.set('name', 'Brian');
|
|
map.set('food', 'sushi');
|
|
|
|
export default function MapAndSet() {
|
|
return <ChildComponent map={map} set={set} />;
|
|
}
|
|
|
|
function ChildComponent(props: any) {
|
|
return null;
|
|
}
|