I am trying to use a react router in my Clojurescript Reagent project. The problem is that the reaction router requires that the components pass React.isValidClass(component) , which in React 0.11.2 is defined as:
ReactDescriptor.isValidFactory = function(factory) { return typeof factory === 'function' && factory.prototype instanceof ReactDescriptor; };
The reagent seems to generate components as an object instead of a function. Here is my code:
(defn home [] [:div [:h1 "Home Page placeholder"]]) (reagent/as-component (home)) ; =>
Has anyone decided how to make this kind of interaction?
reactjs react-router clojurescript reagent
erikcw
source share