diff --git a/reflex/experimental/__init__.py b/reflex/experimental/__init__.py index 1a198f35a..ffba14ff5 100644 --- a/reflex/experimental/__init__.py +++ b/reflex/experimental/__init__.py @@ -13,16 +13,25 @@ from .client_state import ClientStateVar as ClientStateVar from .layout import layout as layout from .misc import run_in_thread as run_in_thread -warn( - "`rx._x` contains experimental features and might be removed at any time in the future .", -) - -_EMITTED_PROMOTION_WARNINGS = set() - class ExperimentalNamespace(SimpleNamespace): """Namespace for experimental features.""" + def __getattribute__(self, item): + """Get attribute from the namespace. + + Args: + item: attribute name. + + Returns: + The attribute. + """ + warn( + "`rx._x` contains experimental features and might be removed at any time in the future .", + dedupe=True, + ) + return super().__getattribute__(item) + @property def toast(self): """Temporary property returning the toast namespace. @@ -55,9 +64,7 @@ class ExperimentalNamespace(SimpleNamespace): Args: component_name: name of the component. """ - if component_name not in _EMITTED_PROMOTION_WARNINGS: - _EMITTED_PROMOTION_WARNINGS.add(component_name) - warn(f"`rx._x.{component_name}` was promoted to `rx.{component_name}`.") + warn(f"`rx._x.{component_name}` was promoted to `rx.{component_name}`.", dedupe=True) _x = ExperimentalNamespace(