From 041abb39c88d57fe0a193ed9691008500be2aa5c Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 22 Apr 2024 11:32:00 -0700 Subject: [PATCH] [REF-2619] Re-init when the template is out of date (#3121) --- reflex/utils/prerequisites.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index e69eb3c5a..148ef9f66 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -893,6 +893,10 @@ def needs_reinit(frontend: bool = True) -> bool: if not os.path.exists(constants.Dirs.WEB): return True + # If the template is out of date, then we need to re-init + if not is_latest_template(): + return True + if constants.IS_WINDOWS: console.warn( """Windows Subsystem for Linux (WSL) is recommended for improving initial install times."""