Skip to content

Instantly share code, notes, and snippets.

@domkm
Created May 21, 2014 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domkm/de0307b8593a90ef9faa to your computer and use it in GitHub Desktop.
Save domkm/de0307b8593a90ef9faa to your computer and use it in GitHub Desktop.
TypeError: Cannot read property 'firstChild' of undefined
(defn render-str [el]
(dom/render-to-str
(om/build
(fn [data owner]
(reify
om/IRender
(render [_] el)))
{})))
(render-str (dom/div nil))
;;=> "<div data-reactid=\".19\" data-react-checksum=\"-1690171002\"></div>"
(render-str (dom/form nil))
;;=> #<TypeError: Cannot read property 'firstChild' of undefined>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment