From 9f7a7a1e4a38b1ab443451d1bbdc802c00a10739 Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Tue, 8 Aug 2023 17:20:09 -0700 Subject: [PATCH] Got rid of mod_import (#1547) --- reflex/components/component.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/reflex/components/component.py b/reflex/components/component.py index 788974154..80ce31e4b 100644 --- a/reflex/components/component.py +++ b/reflex/components/component.py @@ -788,10 +788,4 @@ class NoSSRComponent(Component): def _get_custom_code(self) -> str: opts_fragment = ", { ssr: false });" library_import = f"const {self.tag} = dynamic(() => import('{self.library}')" - mod_import = ( - # https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-named-exports - f".then((mod) => mod.{self.tag})" - if not self.is_default - else "" - ) - return "".join((library_import, mod_import, opts_fragment)) + return "".join((library_import, opts_fragment))