                         (string/replace text pattern (str k " ")))
                       :html
                       (fn []
-                        (dom/div #js {:className "emoji-match"}
-                          (emoji/shortcode->html k)
-                          (dom/div #js {:className "name"}
-                            k)
-                          (dom/div #js {:className "extra"}
-                            "...")))}))))))
+                        (om/build emoji-view k {:react-key k}))}))))))
 
    ; ... @<user>  -> autocompletes user name
    (fn [text thread-id]

                                     (highlight-clear!))))})

            (when autocomplete-open?
              (dom/div #js {:className "autocomplete"}
                (if (seq results)
                  (apply dom/div nil
                    (map-indexed

;                text to replace message with


(defn emoji-view [emoji owner]
  (reify
    om/IRender
    (render [_]
      (dom/div #js {:className "emoji-match"}
        (emoji/shortcode->html emoji)
        (dom/div #js {:className "name"}
          emoji)
        (dom/div #js {:className "extra"}
          "...")))))

(def engines
  [
   ; ... :emoji  -> autocomplete emoji
