    {:will-mount
     (fn [state]
       (let [local-state (atom initial)
-            component   ^js (:rum/react-component state)]
+            ^js/React.Component component (:rum/react-component state)]
         (add-watch local-state key
                    (fn [_ _ p n]
                      (when (not= p n)

  ([element opts]
   (if-not (identical? *target* "nodejs")
     (.renderToString js/ReactDOMServer element)
     (let [react-dom-server (js/require "react-dom/server")]
       (.renderToString react-dom-server element)))))

(defn render-static-markup

  [src]
  (if-not (identical? *target* "nodejs")
    (.renderToStaticMarkup js/ReactDOMServer src)
    (let [^js/ReactDOMServer react-dom-server (js/require "react-dom/server")]
      (.renderToStaticMarkup react-dom-server src))))

;; JS components adapter
