From dbc5694b6d853a6c9eb36050d6e4ee1d86e26d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Thu, 23 Oct 2025 09:48:37 +0200 Subject: [PATCH] Fix --- packages/effect-fc/src/Component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/effect-fc/src/Component.ts b/packages/effect-fc/src/Component.ts index c28ff87..34f6b43 100644 --- a/packages/effect-fc/src/Component.ts +++ b/packages/effect-fc/src/Component.ts @@ -5,7 +5,7 @@ import * as React from "react" import { Memoized } from "./index.js" -export const TypeId: unique symbol = Symbol.for("effect-fc/Component") +export const TypeId: unique symbol = Symbol.for("effect-fc/Component/Component") export type TypeId = typeof TypeId export interface Component

@@ -60,8 +60,8 @@ const ComponentProto = Object.freeze({ ) { const self = this // biome-ignore lint/style/noNonNullAssertion: React ref initialization - const runtimeRef = React.useRef>>(null!) - runtimeRef.current = yield* Effect.runtime>() + const runtimeRef = React.useRef>>(null!) + runtimeRef.current = yield* Effect.runtime>() return React.useRef(function ScopeProvider(props: P) { const scope = Runtime.runSync(runtimeRef.current)(useScope( @@ -433,14 +433,14 @@ export const useScope: { ( deps: React.DependencyList, options?: ScopeOptions, - ): Effect.Effect + ): Effect.Effect } = Effect.fnUntraced(function*(deps, options) { // biome-ignore lint/style/noNonNullAssertion: context initialization const runtimeRef = React.useRef>(null!) runtimeRef.current = yield* Effect.runtime() const key = React.useId() - const scopeMap = yield* ComponentScopeMap + const scopeMap = yield* ComponentScopeMap as unknown as Effect.Effect const scope = React.useMemo(() => Runtime.runSync(runtimeRef.current)(Effect.andThen( scopeMap.ref, @@ -610,7 +610,7 @@ export const useContext: { ( layer: Layer.Layer, options?: ScopeOptions, - ): Effect.Effect, E, RIn | ComponentScopeMap> + ): Effect.Effect, E, RIn> } = Effect.fnUntraced(function* ( layer: Layer.Layer, options?: ScopeOptions,