diff --git a/packages/effect-fc/src/Component.ts b/packages/effect-fc/src/Component.ts index bc10ac6..a2f0d21 100644 --- a/packages/effect-fc/src/Component.ts +++ b/packages/effect-fc/src/Component.ts @@ -34,7 +34,7 @@ const ComponentProto = Object.freeze({ ...Effectable.CommitPrototype, [TypeId]: TypeId, - commit: Effect.fnUntraced(function*
(this: Component
) { + commit: Effect.fn("Component")(function*
(this: Component
) {
const self = this
const runtimeRef = React.useRef ,
context: React.Context => function WithRuntime(props) {
- const runtime = React.useContext(context)
- return React.createElement(Runtime.runSync(runtime)(self), props)
+ return React.createElement(
+ Runtime.runSync(React.useContext(context))(self),
+ props,
+ )
})