react icon indicating copy to clipboard operation
react copied to clipboard

Variation of switch for getting an event inside a signal?

Open nilsbecker opened this issue 4 years ago • 2 comments

I was looking for something like S.switch or E.switch but for an 'a event signal. So basically fun sig_of_events -> sig_of_events |> S.changes |> E.switch E.never. Is this available in some form directly? Is it a bad idea for some reason?

nilsbecker avatar Nov 19 '21 15:11 nilsbecker

ah i see that Note has it. would you recommend Note for new projects currently? is there a use case where Note is a bad idea?

nilsbecker avatar Nov 19 '21 15:11 nilsbecker

actually, in the snippet above, will the events occuring in initial value of sig_of_events be seen? or is the initial value lost in S.changes?

nilsbecker avatar Nov 19 '21 15:11 nilsbecker