0.1.0 #1

Merged
Thilawyn merged 87 commits from next into master 2025-01-18 00:54:42 +01:00
Showing only changes of commit 010416f0b1 - Show all commits

View File

@@ -68,18 +68,18 @@ export class Reffuse<R> {
])
}
// useEffect<A, E>(
// effect: Effect.Effect<A, E, RuntimeR | ContextR | Scope.Scope>,
// deps?: React.DependencyList,
// options?: RenderOptions,
// ): void {
// const runSync = this.useRunSync()
useEffect<A, E>(
effect: Effect.Effect<A, E, R | Scope.Scope>,
deps?: React.DependencyList,
options?: RenderOptions,
): void {
const runSync = this.useRunSync()
// return React.useEffect(() => { runSync(effect) }, [
// ...options?.doNotReExecuteOnRuntimeOrContextChange ? [] : [runSync],
// ...(deps ?? []),
// ])
// }
return React.useEffect(() => { runSync(Effect.scoped(effect)) }, [
...options?.doNotReExecuteOnRuntimeOrContextChange ? [] : [runSync],
...(deps ?? []),
])
}
useSuspense<A, E>(
effect: Effect.Effect<A, E, R>,