Commit 9ac52653 authored by James Laver's avatar James Laver

Fix R.named

parent 71f3fe0b
...@@ -47,4 +47,4 @@ exports._createContext = function(ctor, val) { ...@@ -47,4 +47,4 @@ exports._createContext = function(ctor, val) {
exports._render = function(a,b) { return react_dom.render(a,b); }; exports._render = function(a,b) { return react_dom.render(a,b); };
exports._named = function(name, f) { f.name = name; return f; }; exports._named = function(name, f) { Object.defineProperty(f, 'name', {value: name, writable: false}); return f; };
...@@ -74,7 +74,7 @@ pureLeaf :: ...@@ -74,7 +74,7 @@ pureLeaf ::
=> String => String
-> (Record props -> Element) -> (Record props -> Element)
-> Component props -> Component props
pureLeaf name f = named named $ Component (mkEffectFn1 $ pure <<< f) pureLeaf name f = named name $ Component (mkEffectFn1 $ pure <<< f)
-- | Creates a pure tree component from a function -- | Creates a pure tree component from a function
pureTree :: pureTree ::
......
...@@ -46,7 +46,7 @@ staticTest = ...@@ -46,7 +46,7 @@ staticTest =
type CounterProps = ( count :: Int ) type CounterProps = ( count :: Int )
counterCpt :: R.Component CounterProps counterCpt :: R.Component CounterProps
counterCpt = R.hooksLeaf cpt counterCpt = R.hooksLeaf "Counter" cpt
where where
cpt :: forall m. R.MonadHooks m => Record CounterProps -> m R.Element cpt :: forall m. R.MonadHooks m => Record CounterProps -> m R.Element
cpt {count} = do cpt {count} = do
......
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