We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb4eec1 commit f0b1906Copy full SHA for f0b1906
src/reactiveData.ml
@@ -347,14 +347,17 @@ module RList = struct
347
let first = ref true in
348
let e, send = React.E.create () in
349
let result = from_event [] e in
350
- let _ =
351
- React.S.map
352
- (fun x ->
353
- if !first then (
354
- first := false;
355
- send (Patch [ I (0, x) ]))
356
- else send (Patch [ U (0, x) ]))
357
- s
+ let (`R _) =
+ let s' =
+ React.S.map
+ (fun x ->
+ if !first then (
+ first := false;
+ send (Patch [ I (0, x) ]))
+ else send (Patch [ U (0, x) ]))
358
+ s
359
+ in
360
+ React.E.retain e (fun () -> ignore (React.S.value s'))
361
in
362
result
363
0 commit comments