[email protected] writes: > I am using om library and would like to store html structure in app state's > atom than generate dom/* elements in app-view on the fly. > > Here is one of attempts in implementing this functionality but is not working. > https://gist.github.com/unfoldyourmind/41e287cfb14e68e39cb0. > > Why it does not work and is it even possible?
I'm not an om expert but I think I can answer your question. The problem with your code has nothing to do with storing html in the app state, but with the way you are generating the elements with map. This is happening at runtime, and not in a macro, so the code you are trying to generate never gets executed. You should probably look at something like Sablono with Hickory or else build the html that you have in the app state yourself and then use the :dangerouslySetInnerHtml option. Joe -- Joseph Fahey Twitter: @fahey http://ramure.net http://josf.info -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
