<<Conceptual question re: utility of virtual DOM in ClojureScript apps>>
Maybe a dumb question, but I'm trying to bridge two worlds. In one world, I have an optimized data structure for holding state of the UI (on app, component and individual element level) including data and properties specific to each element which I update (explicitly mutate) and from which the DOM is rendered (via render called on the component level with no argument or render(element) for applying latest state to the actual DOM elements, or passing on to a custom rendering scheme (e.g. WebGL, Canvas, non-DOM renderer) That's been my way for accomplishing state-driven polyglot rendering (dom and independent canvas/webgl widgets) I never have to render entire components or whole DOM if I don't want to. I render individual elements by applying the latest state on demand using optimized DOM manipulation. Mutating state does not automatically update the DOM but can send an event that another component listens to and in turn that component can update its state of the state and render itself, or any individual element within it by applying. There is more to the model, and it's a work in progress, although I have built very complex real time data visualizations using it. My struggle is to understand how to think about the Virtual DOM in React, and while that may be better question for the React mailing list, I have a feeling that folks on this list would have a broader view on things. Specifically, what does Reagent or Om buy me in terms of sanitizing the architecture of the app that I'm not getting by isolating app state from the DOM and rendering individual elements directly based on the state object? I'm digging into Reagent and React, as well as taking on the ClojureScript learning curve. But I need to understand why virtual DOM and tree diff-ing is needed if you have (like in my case) already isolated app state from the DOM and have extremely performant state-driven, on-demand or event-driven per-element rendering. I suspect the answer has to do with core FP paradigm that I've not been considering, and if so I want to know what the paradigm is. Thank you so much for any thoughts. I can post my own JS code with a short notice (needs cleaning up etc) if that helps. Marc -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.