@reffuse/extension-query 0.1.4 #15
@@ -13,7 +13,7 @@ export const LazyRefExtension = ReffuseExtension.make(() => ({
|
|||||||
const [reactStateValue, setReactStateValue] = React.useState(initialState)
|
const [reactStateValue, setReactStateValue] = React.useState(initialState)
|
||||||
|
|
||||||
this.useFork(() => Stream.runForEach(
|
this.useFork(() => Stream.runForEach(
|
||||||
Stream.changes(ref.changes),
|
Stream.changesWith(ref.changes, (x, y) => x === y),
|
||||||
v => Effect.sync(() => setReactStateValue(v)),
|
v => Effect.sync(() => setReactStateValue(v)),
|
||||||
), [ref])
|
), [ref])
|
||||||
|
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ export abstract class ReffuseHelpers<R> {
|
|||||||
const [reactStateValue, setReactStateValue] = React.useState(initialState)
|
const [reactStateValue, setReactStateValue] = React.useState(initialState)
|
||||||
|
|
||||||
this.useFork(() => Stream.runForEach(
|
this.useFork(() => Stream.runForEach(
|
||||||
Stream.changes(ref.changes),
|
Stream.changesWith(ref.changes, (x, y) => x === y),
|
||||||
v => Effect.sync(() => setReactStateValue(v)),
|
v => Effect.sync(() => setReactStateValue(v)),
|
||||||
), [ref])
|
), [ref])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user