ckirkendall / kioo

Enlive/Enfocus style templating for Facebook's React and Om in ClojureScript.
Eclipse Public License 1.0
404 stars 39 forks source link

Fixes unbound var error for Reagent version 0.5.0. #42

Closed jaen closed 9 years ago

jaen commented 9 years ago

As of [kioo "0.4.1-SNAPSHOT"] the library is not working with [reagent "0.5.0-alpha"], since reagent renamed the as-component function to as-element-function. There was an alias introduced for compatibility with older code, but it only extended for react.core namespace and not reagen.impl.template namespace.

Per this issue https://github.com/reagent-project/reagent/issues/93 issue suggested resolution was to stop relying on the reagent.impl.template namespace and use reagent.core/as-component alias instead. The reagent.core/as-component was introduced in version 0.4.0 (relevant commit - https://github.com/reagent-project/reagent/commit/ec7b9acf2389289acb1832854cee14a8a2e433fb) with intention of exposing reagent.impl.template/as-component which is supposedly private. This limits the lower version bound of reagent usable with kioo to 0.4.0, but since project.clj seem to list version 0.4.2 as a dependency it ultimately shouldn't be much of a problem.

The test seem to keep passing no problem, modified version seems to compile to usable reagent components.

jaen commented 9 years ago

In the meantime if anyone needs kioo working on new reagent here's a clojar with the changes - https://clojars.org/org.clojars.jaen/kioo.