Add asserts to adapt-react-class and reactify-component

This commit is contained in:
Dan Holmsand 2015-08-24 20:01:06 +02:00
parent b45f84fa71
commit 57c747b358
2 changed files with 3 additions and 1 deletions

View File

@ -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"

View File

@ -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