Home / Function/ shouldHydrate() — astro Function Reference

shouldHydrate() — astro Function Reference

Architecture documentation for the shouldHydrate() function in server.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  5703d90b_3c3b_3f89_f0a7_d0c7a039aa5b["shouldHydrate()"]
  d27cc44a_e2ff_86d0_e654_f90b112f1bba["server.ts"]
  5703d90b_3c3b_3f89_f0a7_d0c7a039aa5b -->|defined in| d27cc44a_e2ff_86d0_e654_f90b112f1bba
  b93c3061_d0bb_13fa_7748_d8013ed34365["renderToStaticMarkup()"]
  b93c3061_d0bb_13fa_7748_d8013ed34365 -->|calls| 5703d90b_3c3b_3f89_f0a7_d0c7a039aa5b
  style 5703d90b_3c3b_3f89_f0a7_d0c7a039aa5b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/preact/src/server.ts lines 46–49

function shouldHydrate(metadata: AstroComponentMetadata | undefined) {
	// Adjust how this is hydrated only when the version of Astro supports `astroStaticSlot`
	return metadata?.astroStaticSlot ? !!metadata.hydrate : true;
}

Domain

Subdomains

Frequently Asked Questions

What does shouldHydrate() do?
shouldHydrate() is a function in the astro codebase, defined in packages/integrations/preact/src/server.ts.
Where is shouldHydrate() defined?
shouldHydrate() is defined in packages/integrations/preact/src/server.ts at line 46.
What calls shouldHydrate()?
shouldHydrate() is called by 1 function(s): renderToStaticMarkup.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free