0.1.3 #4

Merged
Thilawyn merged 90 commits from next into master 2025-08-23 03:07:28 +02:00
Showing only changes of commit 2763d92f6e - Show all commits

View File

@@ -56,7 +56,7 @@ const ComponentProto = Object.freeze({
const runtimeRef = React.useRef<Runtime.Runtime<Exclude<R, Scope.Scope>>>(null!) const runtimeRef = React.useRef<Runtime.Runtime<Exclude<R, Scope.Scope>>>(null!)
runtimeRef.current = yield* Effect.runtime<Exclude<R, Scope.Scope>>() 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( const scope = Runtime.runSync(runtimeRef.current)(Hooks.useScope(
Array.from( Array.from(
Context.omit(...nonReactiveTags)(runtimeRef.current.context).unsafeMap.values() Context.omit(...nonReactiveTags)(runtimeRef.current.context).unsafeMap.values()
@@ -73,7 +73,7 @@ const ComponentProto = Object.freeze({
}, [scope]) }, [scope])
return React.createElement(FC, props) return React.createElement(FC, props)
}, []) }).current
}), }),
makeFunctionComponent<P extends {}, A extends React.ReactNode, E, R>( makeFunctionComponent<P extends {}, A extends React.ReactNode, E, R>(