Skip to content

Commit 3243916

Browse files
committed
Add a comment explaining the type.
Placing it in the type since that's the central point as opposed to spread out.
1 parent 44f7c13 commit 3243916

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/react-reconciler/src/ReactFiberSuspenseComponent.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ import type {SuspenseInstance} from './ReactFiberHostConfig';
1212
import {SuspenseComponent, SuspenseListComponent} from 'shared/ReactWorkTags';
1313
import {NoEffect, DidCapture} from 'shared/ReactSideEffectTags';
1414

15+
// A null SuspenseState represents an unsuspended normal Suspense boundary.
16+
// A non-null SuspenseState means that it is blocked for one reason or another.
17+
// - A non-null dehydrated field means it's blocked pending hydration.
18+
// - A non-null dehydrated field can use isSuspenseInstancePending or
19+
// isSuspenseInstanceFallback to query the reason for being dehydrated.
20+
// - A null dehydrated field means it's blocked by something suspending and
21+
// we're currently showing a fallback instead.
1522
export type SuspenseState = {|
1623
// If this boundary is still dehydrated, we store the SuspenseInstance
1724
// here to indicate that it is dehydrated (flag) and for quick access

0 commit comments

Comments
 (0)