     (if (= "saved-for-reddit-app-state"
            (re-find #"saved-for-reddit-app-state" (.key js/localStorage c)))
       (do
-        (println c)
+        (.log js/console c)
         (reset! app-state-exists? true)))))
 
 (if (not app-state-exists?)
-  (println "app-state-does not exists"))
+  (console-log "app-state-does not exists"))
 
 ;; save app data in local-storage so that it doesn't get over-written on page reload
 (defonce app-state (local-storage (r/atom {:username ""

          ;;{:keys [error access-token]} body
          error  (:error body)
          access-token (:access_token body)]
      (println response) ;; will it block here till body is available?
      (if (clojure.string/blank? error)
        (set-app-state-field :token access-token)
        (handle-error error)))

(def saved-posts (r/atom {}))
(def subreddits (r/atom {}))
(def get-posts? (r/atom true))


(defn clear-and-refresh-app []
  (alandipert.storage-atom/remove-local-storage! :saved-for-reddit-app-state)
