This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { type Context, Effect, ExecutionStrategy, Exit, type Fiber, Pipeable, Ref, Runtime, Scope, Stream, SubscriptionRef } from "effect"
|
||||
import { type Context, Effect, ExecutionStrategy, Exit, type Fiber, Layer, Pipeable, Ref, Runtime, Scope, Stream, SubscriptionRef } from "effect"
|
||||
import * as React from "react"
|
||||
import * as ReffuseContext from "./ReffuseContext.js"
|
||||
import * as ReffuseRuntime from "./ReffuseRuntime.js"
|
||||
@@ -23,6 +23,10 @@ export abstract class ReffuseHelpers<R> {
|
||||
return ReffuseContext.useMergeAll(...this.constructor.contexts)
|
||||
}
|
||||
|
||||
useLayer<R>(this: ReffuseHelpers<R>): Layer.Layer<R> {
|
||||
return ReffuseContext.useMergeAllLayers(...this.constructor.contexts)
|
||||
}
|
||||
|
||||
|
||||
useRunSync<R>(this: ReffuseHelpers<R>): <A, E>(effect: Effect.Effect<A, E, R>) => A {
|
||||
const runtime = ReffuseRuntime.useRuntime()
|
||||
|
||||
Reference in New Issue
Block a user