@samitouri / QOS-React / commits / b8245de5a1

Nits

Dan committed Apr 4, 2019 at 21:53 UTC b8245de5a116f7c704af70dcf475bca37170bebc
4 files changed +6 -7
shells/dev/app/index.js
-1
@@ -32,7 +32,6 @@ function mountTestApp() {
32 mountHelper(ElementTypes);
33 mountHelper(EditableProps);
34 mountHelper(DeeplyNestedComponents);
35 - mountHelper(SuspenseTree);
35 }
36
37 function unmountTestApp() {
src/backend/renderer.js
+3 -3
@@ -226,7 +226,7 @@ export function attach(
226 setSuspenseHandler,
227 scheduleUpdate,
228 } = renderer;
229 - const supportsEditingSuspense =
229 + const supportsTogglingSuspense =
230 typeof setSuspenseHandler === 'function' &&
231 typeof scheduleUpdate === 'function';
232
@@ -1443,8 +1443,8 @@ export function attach(
1443 // Does the current renderer support editable function props?
1444 canEditFunctionProps: typeof overrideProps === 'function',
1445
1446 - canEditSuspense:
1447 - supportsEditingSuspense &&
1446 + canToggleSuspense:
1447 + supportsTogglingSuspense &&
1448 // If it's showing the real content, we can always flip fallback.
1449 (!isTimedOutSuspense ||
1450 // If it's showing fallback because we previously forced it to,
src/devtools/views/Components/SelectedElement.js
+2 -2
@@ -126,7 +126,7 @@ function InspectedElementView({
126 const {
127 canEditFunctionProps,
128 canEditHooks,
129 - canEditSuspense,
129 + canToggleSuspense,
130 context,
131 hooks,
132 owners,
@@ -165,7 +165,7 @@ function InspectedElementView({
165 const rendererID = store.getRendererIDForElement(id);
166 bridge.send('overrideProps', { id, path, rendererID, value });
167 };
168 - } else if (type === ElementTypeSuspense && canEditSuspense) {
168 + } else if (type === ElementTypeSuspense && canToggleSuspense) {
169 overrideSuspenseFn = (path: Array<string | number>, value: boolean) => {
170 if (path.length !== 1 && path !== IS_SUSPENDED) {
171 throw new Error('Unexpected path.');
src/devtools/views/Components/types.js
+1 -1
@@ -42,7 +42,7 @@ export type InspectedElement = {|
42 canEditFunctionProps: boolean,
43
44 // Is this Suspense, and can its value be overriden now?
45 - canEditSuspense: boolean,
45 + canToggleSuspense: boolean,
46
47 // Can view component source location.
48 canViewSource: boolean,