MCPcopy Index your code
hub / github.com/angular/angular / inferHydrationState

Function inferHydrationState

packages/core/src/render3/util/control_flow.ts:291–305  ·  view source on GitHub ↗

* Infers the hydration state of a specific defer block. * @param tDetails Static defer block information. * @param lDetails Instance defer block information. * @param registry Registry coordinating the hydration of defer blocks.

(
  tDetails: TDeferBlockDetails,
  lDetails: LDeferBlockDetails,
  registry: DehydratedBlockRegistry | null,
)

Source from the content-addressed store, hash-verified

289 * @param registry Registry coordinating the hydration of defer blocks.
290 */
291function inferHydrationState(
292 tDetails: TDeferBlockDetails,
293 lDetails: LDeferBlockDetails,
294 registry: DehydratedBlockRegistry | null,
295): DeferBlockData['incrementalHydrationState'] {
296 if (
297 registry === null ||
298 lDetails[SSR_UNIQUE_ID] === null ||
299 tDetails.hydrateTriggers === null ||
300 tDetails.hydrateTriggers.has(DeferBlockTrigger.Never)
301 ) {
302 return 'not-configured';
303 }
304 return registry.has(lDetails[SSR_UNIQUE_ID]) ? 'dehydrated' : 'hydrated';
305}
306
307/**
308 * Gets the current LView that is rendered out in a defer block.

Callers 1

deferBlockFinderFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…