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"
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace ProviderInner {
|
||||
|
||||
const ProviderInner = <R, ER>(
|
||||
{ runtime, promise, children }: ProviderInner.Props<R, ER>
|
||||
): React.ReactNode => {
|
||||
const value = React.use(promise)
|
||||
return React.createElement(runtime.context, { value }, children)
|
||||
}
|
||||
): React.ReactNode => React.createElement(
|
||||
runtime.context,
|
||||
{ value: React.use(promise) },
|
||||
children,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user