   [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

    :spelling 1
    :word ""
    :hyphenation ""
    :suggested-hyphenation ""
    :feedback {:message "" :kind :none}}))

(def spelling (reagent/cursor app-state [:spelling]))
(def word (reagent/cursor app-state [:word]))
(def hyphenations (reagent/cursor app-state [:hyphenations]))
(def hyphenation (reagent/cursor app-state [:hyphenation]))
(def suggested-hyphenation (reagent/cursor app-state [:suggested-hyphenation]))
(def feedback (reagent/cursor app-state [:feedback]))

(defn update-hyphenations! [f & args]
  (apply swap! app-state update-in [:hyphenations] f args))

(defn remove-hyphenation! [{:keys [word]}]
  (update-hyphenations! dissoc word))

(defn set-feedback! [message kind]
  (reset! feedback {:message message :kind kind})
  (.setTimeout js/window #(reset! feedback {:message "" :kind :none}) 5000))

(defn load-hyphenation-patterns!
  [spelling word]
