          (let [update? (if f (binding [*use-prior* true
                                        *trigger-state-render* false]
                                (f this
-                                  (get-in @component-state [this :props])
-                                  (get-in @component-state [this :state])
-                                  (get-in @component-state [this :prev-props])
-                                  (get-in @component-state [this :prev-state])))
+                                  (d/get @db this :props)
+                                  (d/get @db this :state)
+                                  (d/get @db this :prev-props)
+                                  (d/get @db this :prev-state)))
                              ;; by default, update if props or state have changed
                              true)]
            update?))))

  (:require-macros re-view.core)
  (:require [cljsjs.react]
            [cljsjs.react.dom]
            [sablono.core :refer-macros [html]]
            [goog.object :as gobj]))

(def ^:dynamic *trigger-state-render* true)
(def ^:dynamic *use-prior* false)
(def ^:dynamic *use-prior-props* false)

;; convenience access methods


  ([this props & children]
    ;; manually invoke componentWillReceiveProps
   (when-let [will-receive-props (.-componentWillReceiveProps this)]
     (.call will-receive-props this #js {:cljs$props    props
                                         :cljs$children children}))

    ;; only render if shouldComponentUpdate returns true (emulate ordinary React lifecycle)
