0.1.0 #1

Merged
Thilawyn merged 81 commits from next into master 2025-07-17 21:17:57 +02:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 30563bfc2f - Show all commits

View File

@@ -167,10 +167,13 @@ export const useFork: {
React.useEffect(() => {
const scope = Runtime.runSync(runtime)(options?.scope
? Scope.fork(options.scope, options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential)
: Scope.make(options?.finalizerExecutionStrategy)
: Scope.make(options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential)
)
Runtime.runFork(runtime)(Effect.provideService(effect(), Scope.Scope, scope), { ...options, scope })
return () => closeScope(scope, runtime, options)
return () => closeScope(scope, runtime, {
...options,
finalizerExecutionMode: options?.finalizerExecutionMode ?? "fork",
})
}, deps)
})

View File

@@ -13,6 +13,6 @@ export const Route = createFileRoute("/")({
const context = yield* Hook.useContextSync(TodosStateLive, { finalizerExecutionMode: "fork" })
return yield* Effect.provide(Component.use(Todos, Todos => <Todos />), context)
}).pipe(
Component.withRuntime(runtime.context),
Component.withRuntime(runtime.context)
)
})