Fix
All checks were successful
Lint / lint (push) Successful in 13s

This commit is contained in:
Julien Valverdé
2025-10-22 12:59:33 +02:00
parent 6f96608f64
commit 4a5f4c329d
3 changed files with 9 additions and 10 deletions

View File

@@ -469,8 +469,7 @@ export const useOnMount: {
f: () => Effect.Effect<A, E, R>
) {
const runtime = yield* Effect.runtime<R>()
// biome-ignore lint/correctness/useExhaustiveDependencies: only computed on mount
return yield* React.useMemo(() => Runtime.runSync(runtime)(Effect.cached(f())), [])
return yield* React.useState(() => Runtime.runSync(runtime)(Effect.cached(f())))[0]
})
export const useOnChange: {