   [pattern]
   (ajax/POST "/api/words"
    :params pattern
-   :handler (fn [] (load-hyphenation-patterns! @spelling @word))
+   :handler (fn []
+              (set-feedback! "Word has been added" :success)
+              (load-hyphenation-patterns! @spelling @word))
    :error-handler (fn [details]
                     (.warn js/console
                            (str "Failed to add hyphenation pattern: " details)))

      [word-ui]
      [suggested-hyphenation-ui]
      [hyphenation-ui]
      [hyphenation-add-ui]]]]
   [hyphenation-lookup-ui spelling @word]
   [:h2 "Similar words"]
   [:div.row

                 "disabled")}
    "Add"]])

(defn feedback-ui [feedback]
  (let [{:keys [kind message]} @feedback
        klass (when-not (= kind :none) (str "alert-" (name kind)))]
    (when-not (= kind :none)
      [:div.alert {:class klass :role "alert"} message])))

(defn spelling-ui []
  [:div.form-group
   [:select {:value @spelling
