@samitouri / QOS-React-2 / commits / 5e043adba7

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

Brian Vaughn committed Aug 16, 2019 at 09:05 UTC 5e043adba7ead591959904ade16100c146309396
2 files changed +21
shells/dev/app/InspectableElements/InspectableElements.js
+2
@@ -4,6 +4,7 @@ import React, { Fragment } from 'react';
4 import Contexts from './Contexts';
5 import CustomHooks from './CustomHooks';
6 import CustomObject from './CustomObject';
7 +import MapAndSet from './MapAndSet';
8 import NestedProps from './NestedProps';
9 import SimpleValues from './SimpleValues';
10
@@ -14,6 +15,7 @@ export default function InspectableElements() {
15 <Fragment>
16 <h1>Inspectable elements</h1>
17 <SimpleValues />
18 + <MapAndSet />
19 <NestedProps />
20 <Contexts />
21 <CustomHooks />
shells/dev/app/InspectableElements/MapAndSet.js new
+19
@@ -0,0 +1,19 @@
1 +// @flow
2 +
3 +import React from 'react';
4 +
5 +const set = new Set();
6 +set.add('abc');
7 +set.add(123);
8 +
9 +const map = new Map();
10 +map.set('name', 'Brian');
11 +map.set('food', 'sushi');
12 +
13 +export default function MapAndSet() {
14 + return <ChildComponent map={map} set={set} />;
15 +}
16 +
17 +function ChildComponent(props: any) {
18 + return null;
19 +}