diff --git a/reflex/base.py b/reflex/base.py index 544f89da027..e8f1942fcf5 100644 --- a/reflex/base.py +++ b/reflex/base.py @@ -24,13 +24,8 @@ class Config: use_enum_values = True extra = "allow" - def __init__(self, *args, **kwargs): - """Initialize the base class. - - Args: - *args: Positional arguments. - **kwargs: Keyword arguments. - """ + def __init_subclass__(cls): + """Warn that rx.Base is deprecated.""" from reflex.utils import console console.deprecate( @@ -39,7 +34,7 @@ def __init__(self, *args, **kwargs): deprecation_version="0.8.15", removal_version="0.9.0", ) - super().__init__(*args, **kwargs) + super().__init_subclass__() def json(self) -> str: """Convert the object to a json string.