def _compile_page(self, route: str, save_page: bool = True):
        """Compile a page.

        Args:
            route: The route of the page to compile.
            save_page: If True, the compiled page is saved to self._pages.
        """
        n_states_before = len(all_base_state_classes)
        component, enable_state = compiler.compile_unevaluated_page(
            route, self._unevaluated_pages[route], self._state, self.style, self.theme
        )

        # Indicate that the app should use state.
        if enable_state:
            self._enable_state()

        # Indicate that evaluating this page creates one or more state classes.
        if len(all_base_state_classes) > n_states_before:
            self._stateful_pages[route] = None

        # Add the page.
        self._check_routes_conflict(route)
        if save_page:
            self._pages[route] = component
Compile a page.

        Args:
            route: The route of the page to compile.
            save_page: If True, the compiled page is saved to self._pages.
        
reflex/app.py