Closed parenthetical closed 2 years ago
Another surprising behavior: when replacing now
with pure e
, the a
event gets an occurrence for every e
occurrence, while the b
event does not have the first e
occurrence. I.e. counting both a
and b
will have b
lagging behind by one, staying zero for the first occurrence.
let e :: Event t () = ...
a <- switchHoldPromptOnly never (pushAlways (const (pure e)) e)
b <- switchHoldPromptOnly never . snd =<< runWithReplace (pure ()) (pure e <$ e)
This is because the widget builder monad can't be run inside MonadPush
, so runWithReplace actually builds the new widget after the current frame ends. After that, usually on the next frame, its result event fires.
I ran into some surprising behavior in a Reflex DOM app. I assumed the following events
a
andb
would have occurrences at the same time ase
:However, only event
a
does, whileb
has no occurrences. What could be causing this?