Skip to content

Instantly share code, notes, and snippets.

@zbyte64
Created January 16, 2014 01:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zbyte64/8448337 to your computer and use it in GitHub Desktop.
Save zbyte64/8448337 to your computer and use it in GitHub Desktop.
Render alpacajs form in OM (clojsurescript react.js library); AKA render raw html in OM
(defn show-form [data _]
(om/component
(let [schema (:current-form data)
alpaca-html (.html (.alpaca (js/jQuery. "<div/>") (clj->js {:schema schema})))
form-html (js/React.DOM.div (clj->js {:dangerouslySetInnerHTML {:__html alpaca-html}}))]
form-html)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment