From b79d7858b75f54154700639e407fae025bf5665f Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 25 Aug 2025 10:00:31 -0700 Subject: [PATCH] fix suppressHydrationWarning being set to "true" instead of true --- reflex/app.py | 4 ++-- reflex/compiler/compiler.py | 4 ++-- reflex/compiler/utils.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 1b7a6da1993..dae1a80fd11 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -1311,9 +1311,9 @@ def memoized_toast_provider(): self.head_components, html_lang=self.html_lang, html_custom_attrs=( - {"suppressHydrationWarning": "true", **self.html_custom_attrs} + {"suppressHydrationWarning": True, **self.html_custom_attrs} if self.html_custom_attrs - else {"suppressHydrationWarning": "true"} + else {"suppressHydrationWarning": True} ), ) ) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 8c73077a6e2..f333c3779de 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Iterable, Sequence from inspect import getmodule from pathlib import Path -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Any from reflex import constants from reflex.compiler import templates, utils @@ -465,7 +465,7 @@ def get_shared_components_recursive(component: BaseComponent): def compile_document_root( head_components: list[Component], html_lang: str | None = None, - html_custom_attrs: dict[str, Var | str] | None = None, + html_custom_attrs: dict[str, Var | Any] | None = None, ) -> tuple[str, str]: """Compile the document root. diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 29b43f54a9e..f85a5fe84c0 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -350,7 +350,7 @@ def compile_custom_component( def create_document_root( head_components: Sequence[Component] | None = None, html_lang: str | None = None, - html_custom_attrs: dict[str, Var | str] | None = None, + html_custom_attrs: dict[str, Var | Any] | None = None, ) -> Component: """Create the document root.