               :on-change #(reset! message (-> % .-target .-value))}]
      [:button {:type "submit"} "Send"]]))
 
+(defn show-messages []
+  [:div#messages
+   (for [[[k v] index] (map vector (take-last 30 @messages) (range))]
+     ^{:key (str "message-" index)}
+     (let [{:keys [username message]} v]
+       [:div [:span.username username] ": " [:span.message message]]))])
+
 ;; -- Views -----------------
 
 (defn on-going-chat []

  (fn [db [_ username message chat-room]]
    (m/conj-in! fb-root [(-> chat-room (str/lower-case) (keyword))
                         :messages]
                [username message])
    db))

;; -- View Components -------

   [:label "Your username: "]
   [username-input]

   [show-messages]

   [message-form]])

