Work
All checks were successful
Lint / lint (push) Successful in 14s

This commit is contained in:
Julien Valverdé
2025-06-29 23:00:33 +02:00
parent 2b78d4dc49
commit 2ef47bed70
2 changed files with 4 additions and 1 deletions

View File

@@ -20,7 +20,9 @@ export const useFC: {
) { ) {
const runtime = yield* Effect.runtime<R>() const runtime = yield* Effect.runtime<R>()
return React.useCallback((props: P) => Runtime.runSync(runtime)(self(props)), Array.from( return React.useMemo(() => {
return (props: P) => Runtime.runSync(runtime)(self(props))
}, Array.from(
Context.omit(...nonReactiveTags)(runtime.context).unsafeMap.values() Context.omit(...nonReactiveTags)(runtime.context).unsafeMap.values()
)) ))
}) })

View File

@@ -41,3 +41,4 @@ const MyTestComponent = Effect.fn(function* MyTestComponent(props?: { readonly v
</Box> </Box>
</> </>
}) })
console.log(MyTestComponent)