From 2763d92f6e278aefdd29a18c0cbd85a156bd92f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Thu, 21 Aug 2025 00:41:12 +0200 Subject: [PATCH] Fix --- packages/effect-fc/src/Component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/effect-fc/src/Component.ts b/packages/effect-fc/src/Component.ts index 1ac25c1..6c36f5e 100644 --- a/packages/effect-fc/src/Component.ts +++ b/packages/effect-fc/src/Component.ts @@ -56,7 +56,7 @@ const ComponentProto = Object.freeze({ const runtimeRef = React.useRef>>(null!) runtimeRef.current = yield* Effect.runtime>() - return React.useCallback(function ScopeProvider(props: P) { + return React.useRef(function ScopeProvider(props: P) { const scope = Runtime.runSync(runtimeRef.current)(Hooks.useScope( Array.from( Context.omit(...nonReactiveTags)(runtimeRef.current.context).unsafeMap.values() @@ -73,7 +73,7 @@ const ComponentProto = Object.freeze({ }, [scope]) return React.createElement(FC, props) - }, []) + }).current }), makeFunctionComponent

(