        (this-as this
          (binding [*use-prior-props* false
                    *use-prior* false]
-           (when f (f this (.. this -state -cljs$props) (.. this -state -cljs$state)))))))
+           (when f (f this
+                      (get-in @component-state [this :props])
+                      (get-in @component-state [this :state])))))))
 
    "componentWillMount"
    (fn [f]

         (let [update? (if f (binding [*use-prior* true
                                       *trigger-state-render* false]
                               (f this
                                  (.. this -state -cljs$props)
                                  (.. this -state -cljs$state)
                                  (.. this -state -cljs$previousProps)
                                  (.. this -state -cljs$previousState)))
                             ;; by default, update if props or state have changed
                             true)]
           update?))))

         (when 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])))))))

   "componentDidUpdate"
   (fn [f]
     (fn [_ _]
       (this-as this
         (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])))))

   "render"
   (fn [f]
     (fn []
       (this-as this
         (let [element (f this
                          (get-in @component-state [this :props])
                          (get-in @component-state [this :state]))]
           ;; wrap in sablono.core/html if not already a valid React element
           (if (js/React.isValidElement element)
             element
