I have a function that receives a Dynamic and has to display a dom element which will contain a different kind of child depending on the value in the Dynamic. Is there a way to do such thing using Reflex and Reflex-Dom? The code would look like this if the value in the dynamic could be unwrapped by pattern matching:
myNode :: MonadWidget t m => Dynamic t Bool -> m (Event t ())
myNode (Dynamic True) = elClass "div" "foo" $
elClass "div" "bar"
myNode (Dynamic False) = blank