0.1.3 #4
@@ -1,4 +1,4 @@
|
|||||||
import { Effect, type Layer, ManagedRuntime, Predicate, type Runtime } from "effect"
|
import { Effect, type Layer, ManagedRuntime, Predicate, Runtime } from "effect"
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
|
|
||||||
|
|
||||||
@@ -58,7 +58,8 @@ namespace ProviderInner {
|
|||||||
|
|
||||||
const ProviderInner = <R, ER>(
|
const ProviderInner = <R, ER>(
|
||||||
{ runtime, promise, children }: ProviderInner.Props<R, ER>
|
{ runtime, promise, children }: ProviderInner.Props<R, ER>
|
||||||
): React.ReactNode => {
|
): React.ReactNode => React.createElement(
|
||||||
const value = React.use(promise)
|
runtime.context,
|
||||||
return React.createElement(runtime.context, { value }, children)
|
{ value: React.use(promise) },
|
||||||
}
|
children,
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user