Module Futr
Futures as React
events and vice-versa.
%%VERSION%% — homepage
Events
val to_event : ?never:'a -> (unit -> 'a Fut.t) -> 'a React.event
to_event f
occurs once whenf ()
determines. Iff
is set to never determine the event never occurs unlessnever
is specified in which case it occurs with the valuenever
.Important. It is better if
f
actually creates the future rather than being a closure that captures an already created future. The reason is that TODO.
val of_event : 'a React.event -> 'a Fut.t
of_event e
is a future that determines on the next occurence ofe
.Note. The React update step generating the occurence of
s
is guaranteed to terminate before the future determines.