mirror of https://github.com/status-im/reagent.git
Add asserts to adapt-react-class and reactify-component
This commit is contained in:
parent
b45f84fa71
commit
57c747b358
|
@ -1,4 +1,4 @@
|
|||
(defproject reagent "0.5.1-rc"
|
||||
(defproject reagent "0.5.1-SNAPSHOT"
|
||||
:url "http://github.com/reagent-project/reagent"
|
||||
:license {:name "MIT"}
|
||||
:description "A simple ClojureScript interface to React"
|
||||
|
|
|
@ -47,6 +47,7 @@ which is equivalent to
|
|||
"Returns an adapter for a native React class, that may be used
|
||||
just like a Reagent component function or class in Hiccup forms."
|
||||
[c]
|
||||
(assert c)
|
||||
(tmpl/adapt-react-class c))
|
||||
|
||||
(defn reactify-component
|
||||
|
@ -54,6 +55,7 @@ just like a Reagent component function or class in Hiccup forms."
|
|||
React, for example in JSX. A single argument, props, is passed to
|
||||
the component, converted to a map."
|
||||
[c]
|
||||
(assert c)
|
||||
(comp/reactify-component c))
|
||||
|
||||
(defn render
|
||||
|
|
Loading…
Reference in New Issue