Skip to content

Commit

Permalink
Add a comment explaining the type.
Browse files Browse the repository at this point in the history
Placing it in the type since that's the central point as opposed to spread
out.
  • Loading branch information
sebmarkbage committed Aug 12, 2019
1 parent 19923b3 commit a108e3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react-reconciler/src/ReactFiberSuspenseComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import type {SuspenseInstance} from './ReactFiberHostConfig';
import {SuspenseComponent, SuspenseListComponent} from 'shared/ReactWorkTags';
import {NoEffect, DidCapture} from 'shared/ReactSideEffectTags';

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

0 comments on commit a108e3f

Please sign in to comment.