0.1.0 #1
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user