5 ms·
The Elm architecture is explicitly not FRP. With FRP, you could include a component that changes pretty easily; for example, with GHCJS and reflex, there is a f
by tikhonj 9y ago
The Elm architecture is explicitly not FRP. With FRP, you could include a component that changes pretty easily; for example, with GHCJS and reflex, there is a function called dyn that takes a Dynamic widget (ie a signal of widgets) and turns it into a normal widget:
dyn :: MonadWidget t m => Dynamic t (m a) -> m (Event t a)
The types take a bit of getting used to (reflex-frp is not nearly as beginner friendly as Elm), but once you are used to them it's incredibly expressive. Being able to just wrap a changing widget into a normal widget without needing to change the rest of your code is a big part of why I ultimately like reflex's model far more than the Elm Architecture.