diff --git a/reflex/__init__.py b/reflex/__init__.py index 15eabb0a7f..bba295a142 100644 --- a/reflex/__init__.py +++ b/reflex/__init__.py @@ -37,7 +37,6 @@ from .model import Model as Model from .model import session as session from .page import page as page -from .route import route as route from .state import ComputedVar as var from .state import Cookie as Cookie from .state import LocalStorage as LocalStorage diff --git a/reflex/route.py b/reflex/route.py index 8efcf4096b..0986f7138f 100644 --- a/reflex/route.py +++ b/reflex/route.py @@ -5,51 +5,6 @@ import re from reflex import constants -from reflex.event import EventHandler -from reflex.page import page -from reflex.utils.console import deprecate - - -def route( - route: str | None = None, - title: str | None = None, - image: str | None = None, - description: str | None = None, - on_load: EventHandler | list[EventHandler] | None = None, -): - """Decorate a function as a page. - - rx.App() will automatically call add_page() for any method decorated with route - when App.compile is called. - - All defaults are None because they will use the one from add_page(). - - Note: the decorated functions still need to be imported. - - Args: - route: The route to reach the page. - title: The title of the page. - image: The favicon of the page. - description: The description of the page - on_load: The event handler(s) called when the page load. - - Returns: - The decorated function. - """ - deprecate( - feature_name="@rx.route", - deprecation_version="0.2.3", - reason="and is being replaced by @rx.page due to enhanced routing features.", - removal_version="0.2.8", - ) - - return page( - route=route, - title=title, - image=image, - description=description, - on_load=on_load, - ) def verify_route_validity(route: str) -> None: