0.1.1 #3

Merged
Thilawyn merged 24 commits from next into master 2025-01-22 03:42:22 +01:00
Showing only changes of commit 50c2f1cc83 - Show all commits

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(() =>