* 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, )
| 289 | * @param registry Registry coordinating the hydration of defer blocks. |
| 290 | */ |
| 291 | function 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. |
no test coverage detected
searching dependent graphs…