Mixing Pure Reagents with Om

Suppose I have access to the clean response.js components through some library:

var MyPureJavaScriptComponent = React.createClass({
  render: function() {
    //...
  }
});

But I want to use om.next, where the React components are constructed using a macro defui:

(defui MyComponent
  Object
  (render [this]
          (div nil "Hello, world!")))

Question: What is the best way to get MyPureJavaScriptComponentin om.next? It would be very nice (at least aesthetically) if it could be wrapped inside its own call defuiso that it is MyPureJavaScriptComponentat the same level as every other om.next component. Is this possible (and would it be the best way to do this)?

+4
source share
1 answer

React Om.next, :

(defui MyComponent
  Object
  (render [this]
    (dom/div nil
      (dom/h1 nil "Hello")
      (js/React.createElement js/MyPureJavaScriptComponent #js {:prop "value"}))))
+6

All Articles