Commit 3a3fb2e1 authored by James Laver's avatar James Laver

Add Monoid instance for R.Element

parent 80b52aa4
...@@ -133,6 +133,9 @@ fragment es = rawCreateElement (react .. "Fragment") {} es ...@@ -133,6 +133,9 @@ fragment es = rawCreateElement (react .. "Fragment") {} es
instance semigroupElement :: Semigroup Element where instance semigroupElement :: Semigroup Element where
append a b = fragment [a, b] append a b = fragment [a, b]
instance monoidElement :: Monoid Element where
mempty = fragment []
-- | Renders a React Element to a real Element -- | Renders a React Element to a real Element
render :: Element -> DOM.Element -> Effect Unit render :: Element -> DOM.Element -> Effect Unit
render e d = delay $ \_ -> react ... "render" $ args2 e d render e d = delay $ \_ -> react ... "render" $ args2 e d
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment