Added Set+Map to dev shell, even though we don't support deep inspecting them yet

This commit is contained in:
Brian Vaughn
2019-08-16 09:05:21 -07:00
parent 2bcc6c6d04
commit 5e043adba7
2 changed files with 21 additions and 0 deletions
@@ -4,6 +4,7 @@ import React, { Fragment } from 'react';
import Contexts from './Contexts';
import CustomHooks from './CustomHooks';
import CustomObject from './CustomObject';
import MapAndSet from './MapAndSet';
import NestedProps from './NestedProps';
import SimpleValues from './SimpleValues';
@@ -14,6 +15,7 @@ export default function InspectableElements() {
<Fragment>
<h1>Inspectable elements</h1>
<SimpleValues />
<MapAndSet />
<NestedProps />
<Contexts />
<CustomHooks />
@@ -0,0 +1,19 @@
// @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;
}