Is animate the appropriate function for outputting behavior values to all side effects (i.e. console log, local storage, (v)dom)? Or is it just for canvas? For example, the following works in the browser but not in the console.
seconds :: Behavior Number
seconds = map ((_ / 1000.0) <<< toNumber) Time.millisSinceEpoch
main :: forall e. Eff (console :: CONSOLE, frp :: FRP | e) Unit
main = animate seconds logShow
Is there a more appropriate function built in to handle other non-animation side effects? Are behaviors even appropriate for things like dom updates, storing state, etc? Or is it really just for canvas animation and the like?
I'm coming from a RxJS (events only) mindset... so trying to wrap my head around behaviors is proving difficult.
Is
animate
the appropriate function for outputting behavior values to all side effects (i.e. console log, local storage, (v)dom)? Or is it just for canvas? For example, the following works in the browser but not in the console.Is there a more appropriate function built in to handle other non-animation side effects? Are behaviors even appropriate for things like dom updates, storing state, etc? Or is it really just for canvas animation and the like?
I'm coming from a RxJS (events only) mindset... so trying to wrap my head around behaviors is proving difficult.