0.1.3 #4
@@ -56,7 +56,7 @@ const ComponentProto = Object.freeze({
|
||||
const runtimeRef = React.useRef<Runtime.Runtime<Exclude<R, Scope.Scope>>>(null!)
|
||||
runtimeRef.current = yield* Effect.runtime<Exclude<R, Scope.Scope>>()
|
||||
|
||||
return React.useCallback(function ScopeProvider(props: P) {
|
||||
return React.useRef(function ScopeProvider(props: P) {
|
||||
const scope = Runtime.runSync(runtimeRef.current)(Hooks.useScope(
|
||||
Array.from(
|
||||
Context.omit(...nonReactiveTags)(runtimeRef.current.context).unsafeMap.values()
|
||||
@@ -73,7 +73,7 @@ const ComponentProto = Object.freeze({
|
||||
}, [scope])
|
||||
|
||||
return React.createElement(FC, props)
|
||||
}, [])
|
||||
}).current
|
||||
}),
|
||||
|
||||
makeFunctionComponent<P extends {}, A extends React.ReactNode, E, R>(
|
||||
|
||||
Reference in New Issue
Block a user