om

Please ask the channel first, not @dnolen directly!
2017-12-30T06:43:02.000031Z

Hi, what is the difference between creating a plain js dom element like (.createElement js/document "DIV") and creating one using om wrappers om.dom/div?

2017-12-30T12:44:44.000008Z

The om.dom functions wrap React.createElement so (I believe) the latter creates a React element, the former goes straight to the browser DOM.

rarous 2017-12-30T20:56:07.000006Z

Correct. First one creates DOM element, the second VirtualDOM element.

2017-12-31T09:18:26.000030Z

Great, thanks.

2018-01-02T09:13:51.000234Z

One way of doing this kind of thing is adding a :ref to the dom element, which is a fn that is given the dom element stores a reference to it on the component. (e.g. (fn [el] (set! (.-chartWrapper this) el))) Then you can access it directly in lifecycle methods to set up / tear down your non-react component.

souenzzo 2017-12-30T14:16:08.000064Z

https://github.com/omcljs/om/blob/master/src/main/om/dom.cljc#L139 @ho0man Also, om.dom/div support server-side render(on JVM)