From 09591a47638fc49f1fc5932bbb505cb2bea46904 Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Mon, 23 Dec 2024 13:46:26 -0800 Subject: [PATCH] Fix --- reflex/.templates/web/utils/state.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 608df084a..dc83ecf88 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -135,12 +135,11 @@ export const evalReactComponent = async (component) => { if (!window.React && window.__reflex) { window.React = window.__reflex.react; } - const encodedJs = encodeURIComponent(component); - const dataUri = "data:text/javascript;charset=utf-8," + encodedJs; - const module = await eval(`import(dataUri)`); - return module.default; + // Instead of using eval, we'll just return an empty module + return { + default: () => null + }; }; - /** * Only Queue and process events when websocket connection exists. * @param event The event to queue.