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

This commit is contained in:
Julien Valverdé
2025-01-21 03:54:04 +01:00
parent a1703aae37
commit 50c2f1cc83

View File

@@ -365,7 +365,7 @@ export class Reffuse<R> {
useRefState<A>(ref: SubscriptionRef.SubscriptionRef<A>): [A, React.Dispatch<React.SetStateAction<A>>] { useRefState<A>(ref: SubscriptionRef.SubscriptionRef<A>): [A, React.Dispatch<React.SetStateAction<A>>] {
const runSync = this.useRunSync() const runSync = this.useRunSync()
const initialState = React.useMemo(() => runSync(ref), [ref]) const initialState = React.useMemo(() => runSync(ref), [])
const [reactStateValue, setReactStateValue] = React.useState(initialState) const [reactStateValue, setReactStateValue] = React.useState(initialState)
this.useFork(Stream.runForEach(ref.changes, v => Effect.sync(() => this.useFork(Stream.runForEach(ref.changes, v => Effect.sync(() =>