title: How to create Material UI component in Om Clojurescript?
body: <p>First of all, this <a href="https://github.com/taylorSando/om-material-ui" rel="nofollow">https://github.com/taylorSando/om-material-ui</a> doesn't work with latest React/Material UI.
  The main reason, I think, is this warning in console:</p>
  
  <p><code>Warning: Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory</code></p>
  
  <p>I've also tried to create component "manually":</p>
  
  <pre><code>(ns om-test.core
    (:require [om.core :as om :include-macros true]
              [om-tools.dom :as dom :include-macros true]
              [om-tools.core :refer-macros [defcomponent]]
              [om-material-ui.core :as mui :include-macros true]))
  
  (enable-console-print!)
  
  (defonce app-state (atom {:text "Hello Chestnut!"}))
  
  (defn main []
    (om/root
      (fn [app owner]
        (reify
          om/IRender
          (render [_]
            (dom/div (dom/element js/MaterialUI.Paper {} "Hello")
                     (mui/paper {} "Hello"))
            )))
      app-state
      {:target (. js/document (getElementById "app"))}))
  </code></pre>
  
  <p>So, both of these approaches produces same warning above.</p>
  
  <p>There has been obviously some changes with React. It suggests to create components programatically as: </p>
  
  <pre><code>var React = require('react');
  var MyComponent = React.createFactory(require('MyComponent'));
  
  function render() {
    return MyComponent({ foo: 'bar' });
  }
  </code></pre>
  
  <p>So how do I create Material UI component inside Om render function, or maybe better How do I create React component inside Om render function, in general?</p>
  
  <p>By Material UI I mean this <a href="https://github.com/callemall/material-ui" rel="nofollow">https://github.com/callemall/material-ui</a></p>
  
  <p>My dependencies</p>
  
  <pre><code>:dependencies [[org.clojure/clojure "1.6.0"]
                   [org.clojure/clojurescript "0.0-3058" :scope "provided"]
                   [ring "1.3.2"]
                   [ring/ring-defaults "0.1.4"]
                   [compojure "1.3.2"]
                   [enlive "1.1.6"]
                   [org.omcljs/om "0.9.0"]
                   [environ "1.0.0"]
                   [http-kit "2.1.19"]
                   [prismatic/om-tools "0.3.11"]
                   [om-material-ui "0.1.1" :exclusions [org.clojure/clojurescript
                                                        org.clojure/clojure]]]
  </code></pre>