              "Try again"]]]
 
           (:done-results :loading)
-          (let [loaded-threads (reaction (vals (select-keys @threads
-                                                 (@page :thread-ids))))
-                sorted-threads (reaction (->> @loaded-threads
-                                              ; sort-by last reply, newest first
-                                              (sort-by
-                                                (comp (partial apply max)
-                                                      (partial map :created-at)
-                                                      :messages)
-                                                #(compare %2 %1))))]
+          (let [loaded-threads (vals (select-keys @threads (@page :thread-ids)))
+                sorted-threads (->> loaded-threads
+                                    ; sort-by last reply, newest first
+                                    (sort-by
+                                      (comp (partial apply max)
+                                            (partial map :created-at)
+                                            :messages)
+                                      #(compare %2 %1)))]
             [:div.page.search
              [:div.title (str "Search for \"" @query "\"")]
              [:div.content
               [:div.description
                (if (= status :loading)
                  "Loading more results..."
-                 (str "Displaying " (count @loaded-threads) "/"
+                 (str "Displaying " (count loaded-threads) "/"
                       (count (@page :thread-ids))))]]
              [:div.threads
               {:ref "threads-div"

                     (set! (.-scrollLeft this-elt)
                           (- (.-scrollLeft this-elt) (.-deltaY e))))))}
              (doall
                (for [thread @sorted-threads]
                  ^{:key (:id thread)}
                  [thread-view thread]))]])


               (fn [e]
                 (let [div (.. e -target)]
                   (when (and (= status :done-results)
                           (< (count loaded-threads) (count (@page :thread-ids)))
                           (> 100 (- (.-scrollWidth div)
                                     (+ (.-scrollLeft div) (.-offsetWidth div)))))
                     (dispatch [:set-page-loading true])
                     (let [already-have (set (map :id loaded-threads))
                           to-load (->> (@page :thread-ids)
                                        (remove already-have)
                                        (take 25))]
