countHydrationEvents() — astro Function Reference
Architecture documentation for the countHydrationEvents() function in solid-component.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 3ac210dc_3e04_a544_471f_15eb1d840114["countHydrationEvents()"] 3ca6ecbf_cbec_c92e_be6f_54976de6eedd["solid-component.test.js"] 3ac210dc_3e04_a544_471f_15eb1d840114 -->|defined in| 3ca6ecbf_cbec_c92e_be6f_54976de6eedd 41a82953_b646_6527_edac_079ffe4f5f29["createHydrationEventRegex()"] 3ac210dc_3e04_a544_471f_15eb1d840114 -->|calls| 41a82953_b646_6527_edac_079ffe4f5f29 style 3ac210dc_3e04_a544_471f_15eb1d840114 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/solid-component.test.js lines 202–208
function countHydrationEvents(/** @type {string} */ html) {
// Number of times a component was hydrated during rendering
// We look for the hint "_$HY.r["
// eslint-disable-next-line regexp/prefer-regexp-exec
return html.match(createHydrationEventRegex('g'))?.length ?? 0;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does countHydrationEvents() do?
countHydrationEvents() is a function in the astro codebase, defined in packages/astro/test/solid-component.test.js.
Where is countHydrationEvents() defined?
countHydrationEvents() is defined in packages/astro/test/solid-component.test.js at line 202.
What does countHydrationEvents() call?
countHydrationEvents() calls 1 function(s): createHydrationEventRegex.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free