Refactor
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2025-10-23 23:01:27 +02:00
parent 03eca8a1af
commit 6ae311cdfd
4 changed files with 31 additions and 6 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ export const useSubscriptionRefState: {
Stream.changesWith(ref.changes, Equivalence.strict()),
v => Effect.sync(() => setReactStateValue(v)),
)
), [ref], { finalizerExecutionMode: "fork" })
), [ref])
const setValue = yield* Component.useCallbackSync((setStateAction: React.SetStateAction<A>) =>
Effect.andThen(
@@ -38,7 +38,7 @@ export const useSubscriptionRefFromState: {
Stream.changesWith(ref.changes, Equivalence.strict()),
v => Effect.sync(() => setValue(v)),
)
), [setValue], { finalizerExecutionMode: "fork" })
), [setValue])
yield* Component.useReactEffect(() => Ref.set(ref, value), [value])
return ref