Home / Function/ hydration_mismatch() — svelte Function Reference

hydration_mismatch() — svelte Function Reference

Architecture documentation for the hydration_mismatch() function in warnings.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33["hydration_mismatch()"]
  df278ca2_0a6c_fefe_09f2_b397500fe3c2["warnings.js"]
  5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33 -->|defined in| df278ca2_0a6c_fefe_09f2_b397500fe3c2
  51425661_32dd_029c_f8aa_2371b127bd7f["html()"]
  51425661_32dd_029c_f8aa_2371b127bd7f -->|calls| 5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33
  40f27ad3_30bb_8f2a_3fb3_757088cf7428["set_hydrate_node()"]
  40f27ad3_30bb_8f2a_3fb3_757088cf7428 -->|calls| 5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33
  ace40ef0_8734_2f17_9d6e_35e08f332e08["reset()"]
  ace40ef0_8734_2f17_9d6e_35e08f332e08 -->|calls| 5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33
  965d3fe6_c7da_0708_eb2c_13a616bc4bca["read_hydration_instruction()"]
  965d3fe6_c7da_0708_eb2c_13a616bc4bca -->|calls| 5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33
  95c17f0f_1042_263c_3de2_f8ab899408b0["_mount()"]
  95c17f0f_1042_263c_3de2_f8ab899408b0 -->|calls| 5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33
  style 5ec9c9f6_f767_0a42_fdd7_0cedb5a42d33 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/warnings.js lines 138–150

export function hydration_mismatch(location) {
	if (DEV) {
		console.warn(
			`%c[svelte] hydration_mismatch\n%c${location
				? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}`
				: 'Hydration failed because the initial UI does not match what was rendered on the server'}\nhttps://svelte.dev/e/hydration_mismatch`,
			bold,
			normal
		);
	} else {
		console.warn(`https://svelte.dev/e/hydration_mismatch`);
	}
}

Domain

Subdomains

Frequently Asked Questions

What does hydration_mismatch() do?
hydration_mismatch() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/warnings.js.
Where is hydration_mismatch() defined?
hydration_mismatch() is defined in packages/svelte/src/internal/client/warnings.js at line 138.
What calls hydration_mismatch()?
hydration_mismatch() is called by 5 function(s): _mount, html, read_hydration_instruction, reset, set_hydrate_node.

Analyze Your Own Codebase

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

Try Supermodel Free