From a27edf81c816e0a40219208ec624db8ea8f181bf Mon Sep 17 00:00:00 2001 From: Dan Holmsand Date: Wed, 29 Oct 2014 14:47:55 +0100 Subject: [PATCH] Use isValidElement and createElement to avoid deprecation messages --- src/reagent/impl/template.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reagent/impl/template.cljs b/src/reagent/impl/template.cljs index 4bb1316..d52c671 100644 --- a/src/reagent/impl/template.cljs +++ b/src/reagent/impl/template.cljs @@ -198,7 +198,7 @@ (let [cached-class (util/cached-react-class tag)] (if-not (nil? cached-class) cached-class - (if (.' js/React isValidClass tag) + (if (.' js/React isValidElement tag) (util/cache-react-class tag (wrap-component tag nil nil)) (fn-to-class tag))))))) @@ -218,7 +218,7 @@ k)] (when-not (nil? k') (.! jsprops :key k'))) - (c jsprops))) + (.' js/React createElement c jsprops))) (def seq-ctx #js{})